728x90
전체 에러 :
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 = "member")
'could not instantiate id generator .. ' 와 같은 에러가 발생했다면
다음과 같이 옵션에 allocationSize=1을 넣어주세요.
@Getter
@SequenceGenerator(
name = "member_id_seq",
sequenceName = "idx_member",
allocationSize=1
)
@NoArgsConstructor
@Entity(name = "member")
해결!
728x90
'🍃 𝗦𝗽𝗿𝗶𝗻𝗴 𝗕𝗼𝗼𝘁' 카테고리의 다른 글
[Spring Jpa] @CreatedDate, @LastModifiedDate null (0) | 2022.09.05 |
---|---|
No identifier specified for entity 문제 해결 방법 (0) | 2022.08.31 |
[Spring Data JPA] No Property ~ Found for Type Exception (2) | 2022.08.26 |
intellij - 인텔리제이 @Table(name = "") 빨간줄 없애는 법 (0) | 2022.08.14 |
[Spring Boot] Swagger No operations defined in spec! 에러 해결 (0) | 2022.07.15 |
댓글