hibernate jpa save 数据失败

org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [PRIMARY]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement

我手动插入了一些数据 然后一直报上面这个问题 原因是因为 主键冲突 导致
修改hibernate.自动生成的表里面的 值 就行了,改成 最大+1 的id

image.png
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容