오류발생코드질문드립니다
417
86 câu hỏi đã được viết
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'bookService' defined in file [C:\Users\user\OneDrive\���� ȭ��\����ڷ�\Java_Spring_Library_Application new\library-app\library-app\build\classes\java\main\com\group\libraryapp\service\book\BookService.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userLoanHistoryRep' defined in com.group.libraryapp.repstory.user.userloan.UserLoanHistoryRep defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Invocation of init method failed; nested exception is org.springframework.data.repository.query.QueryCreationException: Could not create query for public abstract boolean com.group.libraryapp.repstory.user.userloan.UserLoanHistoryRep.existIsBookNameAndIsReturn(java.lang.String,boolean); Reason: Failed to create query for method public abstract boolean com.group.libraryapp.repstory.user.userloan.UserLoanHistoryRep.existIsBookNameAndIsReturn(java.lang.String,boolean)! No property 'existIsBookName' found for type 'UserLoanHistory'; nested exception is java.lang.IllegalArgumentException: Failed to create query for method public abstract boolean com.group.libraryapp.repstory.user.userloan.UserLoanHistoryRep.existIsBookNameAndIsReturn(java.lang.String,boolean)! No property 'existIsBookName' found for type 'UserLoanHistory'
요약해보면 자바의 DTO객채의 이름하고 mysql에있는 테이블의 이름과 일치 하지않아서오류가 발생하는듯하는듯한데 왜 오류가 발생할까요? 객채생성하고 테이블올려드릴게요 



Câu trả lời 2
1
메소드명을 existsByBookNameAndIsReturn으로 수정해주니 잘되네요. existsByBookNameAndIsReturn이 메소드는 개발자가 임의로 정해주면 안되는거고 JPA에서 알아볼수있게끔 정해줘야하는거같네요
0
안녕하세요 성문님!! 좋은 질문 감사합니다! 😊
네네 맞습니다! findBy 혹은 existsBy 등으로 시작해서 Entity의 필드 이름과 조합되는 메소드는 메소드 이름을 토대로 SQL 을 자동 생성해주기 때문에 JPA에서 알아볼 수 있게끔 정해진 규칙에 따라 이름을 적어주셔야 합니다.
또 궁금한 점 있으시면 편하게 질문 주세요~ 감사합니다! 👍 🙇
리액트 관련 질문이 있습니다.
0
59
2
스프링부트 버전
0
64
2
7강 강의를 들으려고 했는데 오류가 나서 서버가 안 켜지는거 같아요.
0
53
2
33강. UserLoanHistory의 관계성에 대한 질문
1
50
2
Java JDK 버전 문의의 건
0
126
2
ec2 에서 Linux버전이 달라져서 설치가 안되는것 같은데 자료 최신화좀 해주세요.
0
81
3
h2 console 접속했을 테이블 질문
1
62
1
ec2 서버에서 스프링 실행도 되고 인바운드 설정까지 했는데 index.html 안됨
0
71
2
15강. updateUser() 질문
0
51
2
깃허브 질
0
77
2
여기까지 다 끝냈다고 하셨는데
0
75
2
왜안될까요
0
67
2
MySQL 창이안ㄴ뜹니다
0
53
2
포스트맨
0
46
1
spring 개념적인 질문
0
68
2
인텔리제이 샘플코드 실행 안됨 오류
0
138
2
aws 배포할때 .env 파일에 저장한 환경변수에 관하여 여쭤볼게 있습니다
0
81
1
마이그레이션 오류입니다.
0
165
3
Whitelabel Error Page 오류가 났습니다.
0
155
2
안녕하십니까! 오류가 났습니다.. 도와주세요 ㅜㅜ
1
85
3
궁금한게 있습니다.
0
54
2
DTO 관련
0
66
2
궁금한게 있습니다!
0
59
2
35강에서 returnBook 에서 userLoanHistory 값 중복에 관하여
0
52
2

