当前位置:   article > 正文

### Error updating database. Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncati

error updating database. cause: com.mysql.cj.jdbc.exceptions.mysqldatatrunca

org.springframework.dao.DataIntegrityViolationException: 
### Error updating database.  Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Out of range value for column 'article_id' at row 1
### The error may exist in com/mszlu/blog/mapper/CommentMapper.java (best guess)
### The error may involve com.mszlu.blog.mapper.CommentMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO ms_comment  ( id, content, create_date, article_id, author_id, parent_id, to_uid, level )  VALUES  ( ?, ?, ?, ?, ?, ?, ?, ? )

数据库表 

 

错误原因

数据库设计的字段长度不够

article_id long类型的 

数据库为int型

解决方法 

把数据库对应字段改成bigint

 

 

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

闽ICP备14008679号