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

标签: mysql
13人阅读 评论(0) 收藏 举报
分类:

在是网上找了许多自己也理解了一一点
出现这种原因你的出入的参数为String类型的

    <select id="findproject" resultMap="BaseResultMap" parameterType="String">
        SELECT
        <include refid="prosrColumn" />
        FROM project_recruit
        <where>
            <if test="id !=null  and id !='' ">
                id = #{id}
            </if>
        </where>
    </select>

将里面的输入参数变成_parameter
问题立马解决,原因我也不是很懂,如果需要你可以研究一下源码就应该可以理解了

查看评论

Ibatis:There is no READABLE property named 'userName' in class 'java.lang.String'

ibatis-xx.xml出现如下配置:     select * from t_user where 1=1 instr(name,#userNam...
  • liuyuhua0066
  • liuyuhua0066
  • 2013-04-09 17:02:47
  • 17451

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

一、发现问题   select num,name,phone from student     AND num = #{num}   Mybatis查询传入一个字符串传参数,报There i...
  • z69183787
  • z69183787
  • 2015-06-14 20:48:48
  • 4713

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

在使用mybaitis传参数的时候,如果仅传入一个类型为String的参数,那么在 xml文件中应该使用 _parameter 来代替参数名。...
  • aitcax
  • aitcax
  • 2015-03-17 09:19:21
  • 90728

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

mysql文如下,传入参数为‘parentCategoryId’,运行报错为:There is no getter for property named 'parentCategoryId' in '...
  • noku_ln10
  • noku_ln10
  • 2012-09-14 10:34:44
  • 39698

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

使用mybatis传入参数,如果在mappin.xml中使用标签判断该参数是否为空,通常会报以上异常,解决方法:​在接口中该方法的参数前加上@Param("参数名")注解,即可​ 接口: publ...
  • u011897392
  • u011897392
  • 2015-07-03 10:36:36
  • 8472

mybatis报错 There is no getter for property named 'xx' in 'class java.lang.String

今天在写代码的时候突然遇到这等怪事,用了或者之类的判断语句,就导致报错:  There is no getter for property named 'xx' in 'class java.lan...
  • yansong_8686
  • yansong_8686
  • 2015-09-08 22:47:09
  • 5870

MyBatis报错:There is no getter for property named 'xxx' in 'class java.lang.String'

在Mybatis的mapper文件如果传入的是一个字符串类型的参数,且将该参数用来在判断时,如果直接用参数名来判断,则会报如标题所示的错误, 正确代码如下: select * from s...
  • u012557538
  • u012557538
  • 2016-03-30 22:00:02
  • 823

源码分析 There is no getter for property named '*' in 'class java.lang.String

There is no getter for property named '*' in 'class java.lang.String',此错误之所以出现,是因为mybatis在对parameter...
  • qing_gee
  • qing_gee
  • 2015-12-25 12:36:30
  • 33273

mybatis动态表名遇见There is no getter for property named 'tableName' in 'class java.lang.String'

(1)首先mybatis实现动态表名的sql语句 select * from ${tableName} order by Data_Index Desc limit 0,1 m...
  • Edison_03
  • Edison_03
  • 2017-08-14 17:00:41
  • 1313

Mybatis-There is no getter for property named 'XXX' in 'class java.lang.String'解决办法

There is no getter for property named '**' in 'class java.lang.String       初学mybatis没几天,遇到的问题不少,...
  • u011029071
  • u011029071
  • 2013-09-30 22:19:49
  • 7642
    个人资料
    持之以恒
    等级:
    访问量: 1万+
    积分: 546
    排名: 9万+