본문 바로가기
728x90

🍃 𝗦𝗽𝗿𝗶𝗻𝗴 𝗕𝗼𝗼𝘁36

No identifier specified for entity 문제 해결 방법 No identifier specified for entity 문제 해결 방법 다음과 같은 오류가 발생하면.. nested exception is org.hibernate.AnnotationException: No identifier specified for entity: com.minji.site.domain.Member 해당 클래스의 @Id 어노테이션 항목을 살펴보자. @Id 어노테이션이 무엇을 import 하고 있는가? 만약 import org.springframework.data.annotation.Id가 import되어 있다면 다음과 같이 import javax.persistence.Id로 수정하면 에러 해결! import javax.persistence.Entity; import javax.p.. 2022. 8. 31.
[JPA] Could not instantiate id generator 'entity-name' 전체 에러 : Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: Could not instantiate id generator 'entity-name' [엔티티 클래스] @Getter @SequenceGenerator( name = "member_id_seq", sequenceName = "idx_member" ) @NoArgsConstructor @Entity(name = .. 2022. 8. 26.
[Spring Data JPA] No Property ~ Found for Type Exception JPA를 사용하여 개발 중에 'No property xxx found for type x ! 라는 에러를 만났다. 정확히는 findByEmail(java.lang.String)! No property 'phone' found 였는데 내 프로젝트에 'phone' 이라는 객체가 없었다. phone_number만 있고.. 오타가 있나해서 한참 찾아봤지만 없었고 이유는 간단했다.😅 underscore(_)를 엔티티의 레퍼런스 필드의 프로퍼티를 조회하는 예약어로 사용하고 있어서 사용을 피하라고 되어있었다. 그래서 다음과 같이 바꿔주니 바로 해결.ㅋㅋ 참고 : https://stackoverflow.com/questions/19583540/spring-data-jpa-no-property-found-for-type.. 2022. 8. 26.
intellij - 인텔리제이 @Table(name = "") 빨간줄 없애는 법 보기 싫은 @Table 어노테이션(Annotaion) 빨간줄 없애는 법. 이 빨간줄이 나와도 잘 동작하니 없애보자. Preferences 로 들어간다. (mac은 Preferences, 윈도우는 ctrl + alt + S 를 눌러 Setting) 2. Editor -> inspections 에서 "Unresolved database refereces in annotations" 옵션을 체크 해제, Apply 혹은 OK. 2022. 8. 14.
[Spring Boot] Swagger No operations defined in spec! 에러 해결 Spring Boot Swagger 적용 후 페이지에 api 보이지 않고 No operations defined in spec! 만 보일 때 이유, 해결방안 SwaggerConfig 클래스의 public Docket api() { ... // 생략.apis(RequestHandlerSelectors.basePackage("com.aa.bb.cc")) com.aa.bb.cc 이부분이 패키지명과 동일한지 확인하기. 2022. 7. 15.
[ IntelliJ] tests were Method or class mismatch 이 오류는 여러개의 테스트케이스를 작성해두고 IntelliJ의 편의기능으로 하나의 테스트만 눌러서 실행했을 때 발생한다. 현재 프로젝트의 기본 빌드툴은 Gradle인데, 하나의 테스트케이스를 실행하면 IntelliJ 자체 빌드기능으로 빌드를 해서 실행해준다. 그래서 갑자기 다른 빌드툴로 빌드를 하니 Method가 Missmatch 났다고 알려주는 상황.. 해결 방법은 Preferences에서 다음과 같이 설정해주면 된다. 2022. 7. 11.
[SpringBoot] 'com.mysql.jdbc.Drvier'. This is deprecated 해결방법 문제 상황: Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. 일단 deprecated는 에러가 아니다.. (당연!) 읽어보면 com.mysql.jdbc.Driver가 옛날 버전이니까 com.mysql.cj.jdbc.Driver로 바꿔달라는 내용. application.yml 파일에 다음처럼 수정 후 다시 실행하면 문제가 해결된다. driver-class.. 2022. 7. 11.
[SpringBoot] 프로젝트 생성 후 실행 에러 (Error creating bean with name 'dataSource' defined in class path resource) 상황 : 프로젝트 생성 후 바로 실행 했는데 다음과 같은 에러 남. caused by: org.springframework.beans.factory.beancreationexception: error creating bean with name 'datasource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/datasourceconfiguration$hikari.class]: bean instantiation via factory method failed; nested exception is org.springframework.beans.beaninstantiationexception: failed to inst.. 2022. 7. 11.
thread starvation or clock leap detected housekeeper delta hikari 처음보는 에러 로그.. WARN 23318 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Thread starvation or clock leap detected (housekeeper delta= 나의 경우 원인은 앱을 로컬로 실행하고 컴퓨터가 절전 모드로 전환되어서.. 였다 출처 : https://stackoverflow.com/questions/38703876/log-warning-thread-starvation-or-clock-leap-detected-housekeeper-delta-springh 2022. 5. 9.
728x90