mybatis中if test里判断传参时,如果传参是像int的基本类型,因为它没有getter方法所以会报错:There is no getter for property named 'xxx' in 'class java.lang.Integer'
解决方法:(关于mybatis中基本类型条件判断问题 http://blog.youkuaiyun.com/cclovett/article/details/12855505)
1.修改select语句
2.不修改sql,只修改接口
接口类:
改为:
本文介绍了在MyBatis中处理基本类型参数时遇到的问题及解决方案,包括修改SQL语句、使用@Param注解和封装参数等方法。
1090





