javawed踩坑记录
- 问题:
java.lang.IllegalStateException: No typehandler found for property salePrice
原因:对象属性的set方法中类型和数据库字段类型不对应
解决方法:修改成为相对应的数据类型
2.问题:1064 - You have an error in your SQL syntax; check the manual that correspon
原因:sql语句报错 ,错误的原因是这里多了一个 ,号
解决方法:将 , 去掉
3.问题:nested exception is org.apache.ibatis.reflection.ReflectionException: There
原因:MyBatis映射异常:nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter
找不到映射的数据
解决方法:查看定义的类名是否相符,注意大小写
4:问题:Ambiguous mapping. Cannot map 'xxxxxxxxxxx' method
原因:xxxxxxxxxx方法无法映射
解决方法:我这里是因为数据类型integer 和 int 的原因
ps: java int 和integer 的区别 传送门添加链接描述
5:问题:浏览器页面报错404 找不到资源
原因:浏览器找不到文件路径,文件路径不存在
解决方法:查看文件路径是否正确,一 一 对 应,注意大小写。