본문 바로가기
언어/spring

[Springboot]Failed to initialize JPA EntityManagerFactory, Error creating bean with name 'entityManagerFactory' defined in class path resource 해결

by 김뱅쓰 2023. 1. 23.

문제발생

 

프로젝트 실행 시 자동으로 해당 class의 이름을 가진 DataBase table을 생성해주기 위해 Spring boot + JPA(Hibernate) 를 사용하였다. 하지만 이상하게도 Error creating bean with name 'entityManagerFactory' 메시지가 발생하였다.

 

 

 

 

문제 발견 

엔티티 클래스에 오류 표시를 확인해보니 @Id 와 @GeneratedValue로 속성값 추가하라고 뜸

 

문제해결 

 

해결!