Data truncation: Out of range value for column 'id' at row 1 ### The

org.springframework.dao.DataIntegrityViolationException: 
### Error updating database.  Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of range value for column 'id' at row 1
### The error may involve com.baomidou.springwind.mapper.ActivityMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO activity   ( id,  title,  tag,  content,      `state`,    add_time,  update_time,  places,  deposit,  full_price )  VALUES   ( ?,  ?,  ?,  ?,      ?,    ?,  ?,  ?,  ?,  ? )
### Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of range value for column 'id' at row 1
; SQL []; Data truncation: Out of range value for column 'id' at row 1; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of range value for column 'id' at row 1

解决办法: 数据库 主键id 类型由int改为 bigInt

原文地址:https://www.cnblogs.com/thinkingandworkinghard/p/6832334.html