原文:SpringBoot保存数据报错:could not execute statement; SQL [n/a]; constraint [PRIMARY];nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement

使用SpringBoot做JAVA开发时,用Repository.save 保存数据的时候遇到了报错: 去搜索了一下解决方法,需要将主键设置自增,虽然不清楚为什么,但是将主键设置自增之后确实解决问题了,以后清楚原因之后再来补上。 ...

2019-08-05 10:03 0 3690 推荐指数:

查看详情

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM