<mapper namespace="cn.telchina.standard.mapper.SysOrgnMapper">
<!-- <![CDATA[sql ]]> 尽量每个sql必须写,防止有些特殊字符对sql语句造成的破坏 -->
<select id="queryOrgnList" resultType="SysOrgnModel">
<![CDATA[
select t.* from base.sys_organization t
]]>
<if test="jgid!=null ">
<![CDATA[
where t.fjgid=#{jgid} order by jgbh
]]>
</if>
<if test="jgid==null ">
<![CDATA[
where t.fjgid is null order by jgbh
]]>
</if>
</select>
</mapper>

 

public List<SysOrgnModel> queryOrgnList( Integer jgid);

会触发Mybatis的错误。

 

解决办法:public List<SysOrgnModel> queryOrgnList(@Param("jgid") Integer jgid);

 

原因:

问题分析:Mybatis默认采用ONGL解析参数,所以会自动采用对象树的形式取string.id值,引起报错。

 

另外一种解决办法:

http://www.cnblogs.com/anee/p/3324140.html

Mybatis-There is no getter for property named 'id' in 'class java.lang.String'的更多相关文章

  1. 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 ...

  2. 关于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' ...

  3. 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 ...

  4. mybaits错误解决:There is no getter for property named 'id' in class 'java.lang.String'

    在使用mybaitis传参数的时候,如果仅传入一个类型为String的参数,那么在 xml文件中应该使用_parameter 来代替参数名. 正确的写法: <span style="f ...

  5. There is no getter for property named 'id' in class 'java.lang.String'

    https://blog.csdn.net/u011897392/article/details/46738747 使用mybatis传入参数,如果在mappin.xml中使用<if>标签 ...

  6. 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 ...

  7. 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 ...

  8. mybatis问题: There is no getter for property named 'equipmentId' in 'class java.lang.String'

    本文来源于翁舒航的博客,点击即可跳转原文观看!!!(被转载或者拷贝走的内容可能缺失图片.视频等原文的内容) 若网站将链接屏蔽,可直接拷贝原文链接到地址栏跳转观看,原文链接:https://www.cn ...

  9. Mybatis中传参包There is no getter for property named 'XXX' in 'class java.lang.String'

    Mybatis中传参包There is no getter for property named 'XXX' in 'class java.lang.String' 一.发现问题 <select ...

随机推荐

  1. POJ 2104 K-th Number (划分树)

                                                                K-th Number Time Limit: 20000MS   Memory ...

  2. 「Codeforces Round #441」 Classroom Watch

    Discription Eighth-grader Vova is on duty today in the class. After classes, he went into the office ...

  3. JsonConfig处理日期时间

    写在前面: 页面发送ajax请求到后台,后台返回对应的json格式数据给前台页面进行数据展示,如果json数据中含有日期时间,就需要对日期进行处理 下面是相关的代码部分 JsonConfig json ...

  4. linux系统清理僵尸进程记录

    在UNIX 系统中,一个进程结束了,但是他的父进程没有等待(调用wait / waitpid)他, 那么他将变成一个僵尸进程.  在fork()/execve()过程中,假设子进程结束时父进程仍存在, ...

  5. androidmanifest

    在unity里面这个androidmanifest.xml 就相当于 buildsetting 里面的playersettings

  6. 本地启动tomcat的时候报内存溢出错误:java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: PermGen space

    问题分析: PermGen space的全称是Permanent Generation space,是指内存的永久保存区域,这块内存主要是被JVM存放Class和Meta信息的,Class在被Load ...

  7. Timeline简单配置

    Timeline是一个Jquery时间轴插件.效果如图 获取地址:https://github.com/ka215/jquery.timeline 配置 (1)html表头加入 <link re ...

  8. Unbinding $watch() Listeners In AngularJS

    原文: https://www.bennadel.com/blog/2480-unbinding-watch-listeners-in-angularjs.htm ------------------ ...

  9. 在html页面中直接嵌入图片数据

    一般情况,通常是在html页面中应用图片的链接,如: <img src="http://baidu.com/logo.gif">   但是,这样的前提是我们需要将图片先 ...

  10. node - 写返回mime类型

    何为mime类型?  mime.json { ".323":"text/h323" , ".3gp":"video/3gpp&qu ...