一、问题描述
MyBatis-Plus 添加 insert 功能编译报错 Out of range value for column ‘id’ at row 1:
Error updating database. Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Out of range value for column 'id' at row 1
二、解决方法
使用 mybatisplus 注解 @TableId 指定 id 类型为:type = IdType.AUTO:
@Data
public class User