当前位置:   article > 正文

Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '1288372549423476738' for ...

cause: java.sql.sqlintegrityconstraintviolationexception: duplicate entry '8

报错如下:

org.springframework.dao.DuplicateKeyException: 
### Error updating database.  Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '1288372549423476738' for key 'PRIMARY'
### The error may involve com.atguigu.eduservice.mapper.EduTeacherMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO edu_teacher  ( id, name, intro, career, level, avatar, sort, is_deleted, gmt_create, gmt_modified )  VALUES  ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
### Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '1288372549423476738' for key 'PRIMARY'
; Duplicate entry '1288372549423476738' for key 'PRIMARY'; nested exception is java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '1288372549423476738' for key 'PRIMARY'
    at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:243)
    

由于后端测试的时候没有问题,所以是前端调用的代码写错了

方法名称,括号什么的都写对了吗

 

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/538905
推荐阅读
相关标签
  

闽ICP备14008679号