UnsatisfiedDependencyException 에러
13873
작성한 질문수 1
안녕하세요 김영한 강사님! 얼마 전부터 스프링을 재미있게 수강중인 취준생입니다.
스프링 데이터 JPA 예제를 따라 입력하고 회원가입과 중복회원 예외 테스트 코드를 실행하였더니, Error creating bean with name 'springConfig' defined in file [C:\SpringStudy\begin-spring\out\production\classes\hello\beginspring\SpringConfig.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springDataJpaMemberRepository' defined in hello.beginspring.repository.SpringDataJpaMemberRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Failed to create query for method public abstract java.util.Optional hello.beginspring.repository.MemberRepository.findByID(java.lang.Long)! No property ID found for type Member! Did you mean 'id'?
위와 같은 에러가 발생하였는데, 검색으로 스스로 해결하지 못하였습니다.
SpringConfig.java
데이터 JPA가 빈을 등록할때 빈 자체를 인식하지 못하는것인지. 프로퍼티 id와 관련해서 오탈자가 있는 것인지 모르겠습니다.
어디를 보여드려야 할 지 몰라서 강의를 보며 입력한 코드의 깃허브 주소를 함께 올립니다.
https://github.com/lilaco/begin-spring
퀄리티 높은 수업을 제공해 주셔서 감사합니다 :)
답변 1
인텔리제이 오류
0
33
1
..
0
92
2
Unused property.....
0
109
2
project JDK is misconfigured
0
149
2
외부 API의 ID 타입(String/UUID)과 내부 도메인의 ID 타입(Long)이 불일치할 때의 설계 정석
0
94
2
단위/통합 테스트 버전충돌 문제
0
95
2
❗️springboot 4.0.2 버전 aspectj dependency 설정❗️
0
242
1
왜 컨트롤러는 변한게 없는데 새로 만든 html 파일이 뜨나요?
0
112
2
윈도우 build test오류 질문
1
111
2
테스트 관련 공부에 대한 조언을 얻고 싶습니다
0
106
2
테스트 실행 시 에러 질문
0
306
1
name을 통한 비교와 객체를 통한 비교
0
77
1
빌드 후 libs 없음
1
137
1
윈도우 gradlew.bat 에러
0
175
1
@PostMapping("/members/new")가 동작하지 않습니다
0
94
1
java static class와 kotlin class
0
85
1
스프링 DB연결
0
137
1
소요 시간
0
93
2
ddl.sql에 빨간 밑줄
1
109
2
welcome page 에러
0
191
3
잘 모르겠습니다.
0
169
2
fail을 똑같이 쳤는데 오류가 발생해요
0
166
2
index.html Welcome page
0
130
1
프로젝트 gradle-groovy ?
0
389
1





