java异常处理
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
Failed to parse multipart servlet request; nested exception is java.io.IOException: The temporary upload location
原因:找不到对应路径文件
解决方案:创建异常信息打印出来的路径即可