🔗 JPA
[JPA] jdbcsqlintegrityconstraintviolationexception null not allowed for column
비타민찌
2022. 10. 14. 15:36
728x90
에러 로그:
jdbcsqlintegrityconstraintviolationexception null not allowed for column ...
해결방법:
# 1
H2 데이터 베이스 버전 1.4.200 으로 변경.
# 2
H2 database GenerationType.IDENTITY 오류
Member.java의
@GeneratedValue(strategy = GenerationType.IDENTITY) 부분을
@GeneratedValue(strategy = GenerationType.SEQUENCE) 로 변경
# 3
H2 2.1.210 버전에서 ;MODE=MySQL 추가
spring.datasource.url=jdbc:h2:tcp://localhost/~/test;MODE=MySQL
728x90