mybatis常见错误及注意事项

mybatis常见错误以及注意事项

【注意】
1.注释
2.日志文件
3.查询时,尽量不用 ‘*’查询全部
4.sql语句注意返回结果类型
4.想好函数名
5.接手别人项目模块时,尽量不要删除别人的代码


【错误】
1.org.apache.ibatis.bingding.BindingException:Invalid bound statement (not found)
mybatis文件缺少与dao方法相对应的语句


2. There is no getter for property named 'img_url' in 'class com.enjoyer.cfsc.domain.model.SRScoreGoods'
sql语句的字段

3.注意返回结果(暂无实例)


4.host 'ip地址'is blocked because of many connection errors;unblock with 'mysqladmin flush - hosts'
错误连接次数过多,导致无法连接。
解决方案:(1)mysqladmin -u<账号> -p <密码> -h<ip> flush-hosts或flush hosts

猜你喜欢

转载自blog.csdn.net/qq_1365462762/article/details/78905001