mybatis报错invalid types () or values ()解决方法

来源:互联网 发布:金达莱花dj网络歌手 编辑:程序博客网 时间:2024/06/03 15:57

mybatis报错invalid types () or values ()解决方法

报错信息:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: Error instantiating class com.huawei.PIM.DA.common.tools.DB.bean.table.T_contactList with invalid types () or values (). Cause: java.lang.NoSuchMethodException: com.huawei.PIM.DA.common.tools.DB.bean.table.T_contactList.<init>()

原因:
1) model中的get/set方法与成员变量不一。
2) 构造函数被重载过,但是没有空的构造函数。
3) 最好不要使用简单类型,如int, long等,改用对象模式Integer, Long等。在写条件查询时会用到判断<if xxx != null > … </if>的

阅读全文
0 0
原创粉丝点击