어제 문제
Entity has no identifier
=> 아래 글로 해결함
https://sudo-minz.tistory.com/122
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 어노테이
sudo-minz.tistory.com
@Id 어노테이션이 무엇을 import 하고 있는가?
만약 import org.springframework.data.annotation.Id가 import되어 있다면
다음과 같이 import javax.persistence.Id로 수정
2.
org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "MEMBER" not found
책에서 지우라는 거 삭제 안해서 그런듯
resources 에서 data.sql 삭제했더니 돌아감
3.http://localhost:8080/h2-console
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
spring:
jpa:
#전송 쿼리 확인
show-sql: true
properties:
hibernate:
format_sql: true
defer-datasource-initialization: true
datasource:
url: jdbc:h2:mem:testdb
h2:
console:
enabled: true
'공부 > Spring' 카테고리의 다른 글
스프링 부트 3 백엔드 개발자 되기_8 (0) | 2023.08.08 |
---|---|
스프링 부트 3 백엔드 개발자 되기_7 (0) | 2023.08.07 |
스프링 부트 3 백엔드 개발자 되기_5 (0) | 2023.08.03 |
스프링 부트 3 백엔드 개발자 되기_4 (0) | 2023.08.02 |
스프링 부트 3 백엔드 개발자 되기_3 (0) | 2023.08.01 |