인프런 커뮤니티 질문&답변
[Solved] 서비스 실행 시 Bean 관련 오류 도움 요청드립니다.
작성
·
359
0
Run을 하면 아래와 같은 오류가 발생합니다. 혹시 점검해봐야햘 부분을 아래 로그로 확인이 되실지요ㅜㅜ
Description: Field userRepository in com.example.userservice.service.UserServiceImpl required a bean of type 'com.example.userservice.jpa.UserRepository' that could not be found.
Action: Consider defining a bean of type 'com.example.userservice.jpa.UserRepository' in your configuration.
답변 1
1
CoonZaCCang
질문자
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<scope>test</scope>
</dependency>
pom.xml 에 jpa dependency 추가 시 scope test를 지워 해결하였습니다. 강의를 다시 보면서 확인한부분입니다.





