인프런 커뮤니티 질문&답변

김건우님의 프로필 이미지

작성한 질문수

자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]

강의 자료 (완성된 코드)

31강

24.05.23 03:03 작성

·

124

0

Description:

Parameter 0 of constructor in com.group.libraryapp.service.user.UserService required a bean of type 'com.group.libraryapp.repository.user.UserRepository' that could not be found.

Action:

Consider defining a bean of type 'com.group.libraryapp.repository.user.UserRepository' in your configuration.

Disconnected from the target VM, address: '127.0.0.1:53718', transport: 'socket'

Process finished with exit code 1
이게 계속 뜨면서 실행이 안됩니다 제발 도와주세요 ㅜㅜㅜㅠㅠ gpt에다가 물어봤는데도 안되어서 말씀드립니다

답변 1

1

최태현님의 프로필 이미지
최태현
지식공유자

2024. 05. 23. 13:02

안녕하세요, 건우님! 질문 주셔서 감사합니다. 🙂

핵심은 Parameter 0 of constructor in com.group.libraryapp.service.user.UserService required a bean of type 'com.group.libraryapp.repository.user.UserRepository' that could not be found. 로 보이는데요!

이 에러를 해석해보면, UserService 를 스프링이 관리하는 bean으로 만드려 하는데, UserService 클래스에 있는 첫 번째 생성자인 UserRepository 를 찾을 수 없다는 뜻입니다!

UserRepository 를 정상적으로 설정해주시면 해결될 것으로 보입니다.

꼭 해결되셨으면 좋겠습니다. 감사합니다! 🙏