작성
·
751
1
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'springConfig' defined in file [E:\스프링-부트\hello-spring\hello-spring\bin\main\hello\hellospring\controller\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.hellospring.repository.Impl.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.hellospring.repository.Impl.MemberRepository.findByID(java.lang.Long)! No property ID found for type Member! Did you mean 'id'?
굵은색으로 표시됀게 문제의 원인인거 같아
MemberRepository 파일을 열어보니
제가 이렇게 해놧는대
findByID - > findById 로 바꿧더니 에러가 해결됐는대
이건또 어떤 규칙..인가요? 낙타등표기법을 명시해야만 Jpa가 인식을 하는건가요?
아직 Jpa 학습하기 전이라 무척 헷갈리네요 ..