关于in column 'x' is outside valid range for the datatype mybatis
时隔两年,昨天工作中遇到一个说小很小,说坑很坑的问题。
报错内容如下:意思就是说你定义的字段和你映射的字段类型不符,导致字段不够长
第一时间排查pojo,发现字段类型符合,查看xml映射,字段类型符合
Error attempting to get column 'position_id' from result set. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLDataException: '2.26329069642346496E17' in column '9' is outside valid range for the datatype INTEGER.
; '2.26329069642346496E17' in column '9' is outside valid range for the datatype INTEGER.; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLDataException: '2.26329069642346496E17' in column '9' is outside valid range for the datatype INTEGER.
下面为样式
@Data
//@AllArgsConstructor
//@NoArgsConstructor
@Builder
public class Item {
/**
* 自增主键
*/
private Long id;
/**
* 请求ID
*/
private Long re