Mysql問題
當後端使用的是SpringJPA作爲持久層的結局方案時,前端做新增請求時報錯could not execute statement; nested exception is org.hibernate.exception.GenericJDBCException: could not execute statement
問題解決
- 解決方式
到mysql給相應的表的 主鍵 字段設置 “自增”
- 問題原因
是對應的pojo的設置了id自增的註解,但是mysql本身並沒有給id設置自增,所以當新增時就出現了衝突