首页 > 代码库 > Data truncation: Out of range value for column 'id' at row 1 ### The

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

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