BugNote
No identifier specified for entity 문제 해결 방법~
제뉴어리맨
2022. 9. 2. 00:31
만약 아래와 같은 에러가 비스무리하게 나타난다면
nested exception is org.hibernate.AnnotationException: No identifier specified for entity: com.snowdeer.database.board.Member
중요한건
No identifier specified for entity 이부분이다.
즉 엔티티에 식별자가 없다는것이다.
아마도 당신은 @Id라고 분명히 넣었는데 왜 안되는거냐 하겠다.
그렇다면,
아마도 잘~ 확인해보시라
import org.springframework.data.annotation.Id
혹시 이게 import 되어 있지않나.
그렇다 그것이 아니다.
import javax.persistence.Id 이것으로 import를 해주야 에러가 발생하지 않는다.
그러므로 당신이 틀렸다는것을 인정하자.
참고 : https://snowdeer.github.io/spring-boot/2019/11/28/spring-boot-no-identifier-specified-for-entity/