There is no getter for property named 'userId' in 'class java.lang.String'
[ERROR] 2017-01-18 04:37:06:231 cn.dataenergy.common.CenterHandlerExceptionResolver (CenterHandlerExceptionResolver.java:44) - 统一捕获异常: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'userId' in 'class java.lang.String'
对于这个错误。可能的原因我这里总结一下,如有不足,请及时提醒并更正!
原因1,检查可能出错的bean,如果确实没有个get方法,添加get方法即可解决
原因2,原因1没有问题,可能出错的就是对应的xml文件出错了,一般,当只有一个查询条件时,应当这样写where条件,userId={value},当查询条件有多个的时候,一般我们是把他放到一个*ReqBean里,这个bean里的字段要和xml文件上面的sql-where字段一一对应
There is no getter for property named 'userId' in 'class java.lang.String'的更多相关文章
- MyBatis3: There is no getter for property named 'code' in 'class java.lang.String'
mybatis3 : mysql文如下,传入参数为string类型时‘preCode’,运行报错为:There is no getter for property named 'preCode' i ...
- mybatis There is no getter for property named 'xx' in 'class java.lang.String
转载自://http://www.cnblogs.com/anee/p/3324140.html 用mybatis查询时,传入一个字符串传参数,且进行判断时,会报 There is no getter ...
- mybaits错误解决:There is no getter for property named 'parentId ' in class 'java.lang.String'
在使用mybaitis传参数的时候,如果仅传入一个类型为String的参数,那么在 xml文件中应该使用_parameter来代替参数名. 比如mapper中如下方法,只有一个String值 publ ...
- Mybatis问题:There is no getter for property named 'unitId' in 'class java.lang.String'
Mybatis遇到的问题 问题: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.re ...
- SSM框架报错分析(一)——There is no getter for property named 'XXX' in 'class java.lang.String'
一.发现问题 <select id="queryStudentByNum" resultType="student" parameterType=&quo ...
- Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'zoneId' in 'class java.lang.String'
本文为博主原创,未经允许不得而转载: 异常展示: dao层定义的接口为: public int getClientTotal(); 在mybatis中的sql为: <select id=&quo ...
- Mybatis异常There is no getter for property named 'XXX' in 'class java.lang.String'
1.当入参为 string类型时 (包括java.lang.String.) 我们使用#{xxx}引入参数.会抛异常There is no getter for property named 'XX ...
- org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'parentId' in 'class java.lang.String'
Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ' ...
- mybatis之org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'time' in 'class java.lang.String'
mybatis接口 List<String> getUsedCate(String time); 配置文件 <select id="getUsedCate" pa ...
随机推荐
- extjs 框架模板
的 <script> Ext.onReady(function(){ Ext.create('Ext.container.Viewport', { layout: 'border', it ...
- exe打包发行哪家强
exe打包发行哪家强,我推荐Advanced Installer11.0: 该有的都有了,这是网盘地址:http://pan.baidu.com/s/1geRDPIz
- PAT (Advanced Level) 1081. Rational Sum (20)
简单模拟题. #include<cstdio> #include<cstring> #include<cmath> #include<vector> # ...
- Java IO整理
参考博客:http://www.cnblogs.com/rollenholt/archive/2011/09/11/2173787.html Java IO体系结构 1.要弄清楚其体系结构,先明白 ...
- javascript面向对象一:函数
Arguments对象 <script type="text/javascript"> /* Arguments对象: * 在Java中存在函数的重载现象. * 节省了 ...
- LintCode 面试题 旋转字符串
1.题目描述 题目链接:http://www.lintcode.com/zh-cn/problem/rotate-string/ 给定一个字符串和一个偏移量,根据偏移量旋转字符串(从左向右旋转) 2. ...
- 用css制作一个三角形箭头
剑走偏锋——用css制作一个三角形箭头 通常,我们做上图那个三角形,一般都是做张图,而且需要两张,因为一般都是下拉菜单的效果,需要有个hover的样式,箭头是反的.那是不是有更好的办法呢,毕竟要用 ...
- JAVA基础--代理模式
interface Network{ public void browse() ; // 浏览 } class Real implements Network{ public void browse( ...
- CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
连接mysql出错:CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access denied for u ...
- ubuntu下如何安装和卸载wine-qq
1.安装wine 按ctrl+alter+T打开终端输入以下两条命令 sudo apt-get update sudo apt-get install wine 安装时间有点长,请耐心的等候 2.按钮 ...