一、起因
小编是因为在插入一条数据到mysql中,采用Mybatis-plus自动生成id长度超过了数据库的长度导致报错了,报错信息如下
代码语言:javascript复制Cause: java.sql.SQLException: Data truncated for column 'id' at row 1;
Data truncated for column 'id' at row 1; nested exception is java.sql.SQLException: Data truncated for column 'id' at row 1] with root cause
java.sql.SQLException: Data truncated for column 'id' at row 1
二、解决方案
Q.E.D.