原文: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