Mybit错误,提示There is no getter for property named 'tid' in 'class java.lang.String'
改成
<select id="queryStudentByNum" resultType="student" parameterType="string">
select num,name,phone from student
<where>
<if test = " _parameter!=null and_parameter!='' ">
AND num = #{_parameter}
</if>
</where>
</select>
无论参数名,都要改成"_parameter"。
要加上parameterType="string" 然后把参数改成_parameter
原因分析
Mybatis默认采用ONGL解析参数,所以会自动采用对象树的形式取string.num值,引起报错。也可以public List methodName(@Param(value="num") String num)的方法说明参数值
Mybit错误,提示There is no getter for property named 'tid' in 'class java.lang.String'的更多相关文章
- Mybatis找不到参数错误:There is no getter for property named 'categoryId' in 'class java.lang.Integer'。
Mybatis找不到参数错误:There is no getter for property named 'categoryId' in 'class java.lang.Integer'. 错误Li ...
- 关于mybtis 使用过程中发生There is no getter for property named 'id' in class 'java.lang.String' 错误
今天在修改一个关于mybtis语句时,偶然发现的一个错误 There is no getter for property named 'id' in class 'java.lang.String' ...
- mybaits错误解决:There is no getter for property named 'parentId ' in class 'java.lang.String'
在使用mybaitis传参数的时候,如果仅传入一个类型为String的参数,那么在 xml文件中应该使用_parameter来代替参数名. 比如mapper中如下方法,只有一个String值 publ ...
- 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 ...
- 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 (CenterHandlerEx ...
- 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 ...
- 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笔记四:nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'id' in 'class java.lang.String'
错误异常:nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for pr ...
随机推荐
- iOS-----获取当前app的名称和版本号
iOS获取当前App的名称和版本号 第一步 如图中Info.plist中鼠标点击右键,出现选项框,选着" Show Raw Keys/Values " 第二步 用下面代码就可以获取 ...
- NSLayoutConstraint 布局,配合简单的动画效果
demo地址 :链接: http://pan.baidu.com/s/1c00ipDQ 密码: mi4c 1 @interface ViewController () @property (nonat ...
- KT板
前言 好吧,我是学计算机的,现在的职位是网站美工,只是自己学了点PS.AI的,其实对材质什么的也不太了解.以下的一些信息,基本都是自己先网上查,最后找厂商确认的,不能保证完全精确,但求基本符合事实. ...
- HDU1556 线扫
昨天睡得太晚,今天又在看新算法,明天事情也多,烦,所以今天刷刷水题就过去了. 叫我用线段树,我反而搞不来 #include<cstdio> #include<cstdlib> ...
- SSH使用密钥登录并禁止密码登录
#1 新建用于登录的用户useradd -p `echo "KYmO4ClPt1" | openssl passwd -1 -salt $(< /dev/urandom tr ...
- grpc nodejs tools 安装问题
grpc nodejs 应用安装提示错误: stack Error: EPERM: operation not permitted, utime '/usr/local/lib/node_modul ...
- phpstrom主题
http://phpstorm-themes.com/ 安装方法 JAR文件 导航->file->Import Settings->然后选择你刚才下载的JAR文件->点击确认- ...
- python官网
https://www.python.org/ https://docs.python.org/2/library/pydoc.html
- gitlab安装、配置与阿里云产品集成
https://www.ilanni.com/?p=12819 一.gitlab安装与部署 gitlab的安装可以分为源码安装和通过安装包进行安装,要是按照我以前的写作习惯的话,我也会把源码安装在本文 ...
- 常见企业IT支撑【2、samba共享文件夹】
samba共享文件夹,较Window自带的比较:开源,安全 建议安装samba4,兼容性好 1.安装samba #yum -y install samba4 samba4-client 2.备份sam ...