java执行sql查询时,报异常:
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLDataException: '1.810262010002111E15' in column '1' is outside valid range for the datatype INTEGER.
问题原因:
因为Mybatis里面xml映射文件设置的type=integer太短,不符合数据库中的长int所导致,
解决方案:
需要在 pojo类中吧 这个属性的类型改为long/bigint,还需要把type=integer改为long/bigint 即可解决。