添加时数据库报错

来源:互联网 发布:python数字转换字符串 编辑:程序博客网 时间:2024/06/04 19:33
严重: Servlet.service() for servlet [springmvc] in context with path [/crm01] threw exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [PRIMARY]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement] with root cause

com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '2' for key 'PRIMARY'

当时在数据库里点到了2这个主键id,然后在项目里添加不了.

原创粉丝点击