java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
解决方案:
Long countLong = 3L; // java.lang.Number是Integer,Long的父类. Number num = countLong; int countInt = num.intValue(); System.out.println(countInt);
Data truncation: Out of range value adjusted for column 'distance' at row 1
解决方案:
1. 为 int 类型修改为bigint类型
2. 给该字段设置为null