zoukankan      html  css  js  c++  java
  • Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '1288372549423476738' for key 'PRIMARY'

    报错如下:

    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)
        

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

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

  • 相关阅读:
    java对象转json对象
    cas-client登录后报INVALID_PROXY_CALLBACK
    tomcat启动一闪而过,调试tomcat
    获取url中的参数
    cas 退出后跳转指定页面
    cas增加验证码
    spring security+cas(cas proxy配置)
    oracle 导入导出指定表
    Marshaller根据对象生成xml文件
    webpack学习笔记
  • 原文地址:https://www.cnblogs.com/ooo888ooo/p/13414264.html
Copyright © 2011-2022 走看看