overhead
- 모듈 패키지 구조

- Gradle Tap 의존성 주입

- 모듈 의존성

problem
module-api 프로젝트에서 module core에 있는 Entity와 Repository를 참조 하고 있다.
하지만
@SpringBootTest 즉, 통합 테스트 도중 적절한 빈을 찾지 못하였다고 한다.- module-api 부분에서 Member에 관한 서비스를 작성하고 참조는 잘 받았다.
- 왜냐하면 dependcies에서 core 모듈을 의존 받았기 때문이다.

하지만
실행 통합테스트 과정에서는 빨간줄이 실행됬다…


- 해당 줄의 오류 내역
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'memberService' defined in file [/Users/yeon/IdeaProjects/moulti/module-api/out/production/classes/com/sample/api/service/MemberService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.sample.core.repository.MemberRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
해당 블로그를 대표적으로 여러개를 찾아보았지만, Test도 안돌리고 구성하는 방법에 관한 간단한 예시들로만 구성되어있었다.
해당 블로그는 그러한 내용이 없이 다른 모듈 잘 참조해서 가져온다…
내가 생각했던 문제점
- 빈을 찾지 못하니 컴포넌트 스캔이 module-api 에서만 스캔이 일어나는 것 같으므로 componentScan 범위를 추가적으로 설정해 줘야 겠다고 생각했다. 그래서 액션 했지만…
- 결과는 … 똑같다.. 왜그러는 것일까…

