我的异常处理笔记1-There is no getter for property named 'xx' in 'class java.lang.String'
2017-07-22 10:24
639 查看
There is no getter for property named ‘xx’ in ‘class java.lang.String’
当通过ssm实现筛选搜索时,出现以下错误。
我的功能需求是:通过传入前台页面用户输入的检索条件,后台进行查询。
前台页面:
mapper.xml文件代码:
mapper.Java的代码:
所报异常:
解决:
查找自 http://www.mamicode.com/info-detail-962418.html
在mybatis mapper.java中,正常来说,单个参数或者实体传入,不需要加:@Param(“fundId”),但如果 mapper.xml中有
这样的判断的话,就必须要在mapper.java中参数传入时加上:@Param(“fundId”)。
估计是因为 mapper.xml的配置信息必须要用注解的方式进行注入。
当通过ssm实现筛选搜索时,出现以下错误。
我的功能需求是:通过传入前台页面用户输入的检索条件,后台进行查询。
前台页面:
mapper.xml文件代码:
<select id="findCar" resultType="com.bjsxt.pojo.Cars" > SELECT * FROM cars <where> <if test="isRenting!='-1'"> and ISRENTING=#{isRenting} </if> </where> </select>
mapper.Java的代码:
List<Cars> findCar(String isRenting);
所报异常:
解决:
查找自 http://www.mamicode.com/info-detail-962418.html
在mybatis mapper.java中,正常来说,单个参数或者实体传入,不需要加:@Param(“fundId”),但如果 mapper.xml中有
<if test=" fundId!=0"> and i.fundId = #{fundId} </if>
这样的判断的话,就必须要在mapper.java中参数传入时加上:@Param(“fundId”)。
估计是因为 mapper.xml的配置信息必须要用注解的方式进行注入。
相关文章推荐
- Mybatis error,There is no getter for property named 'xx' in 'class java.lang.String',解决办法
- mybatis There is no getter for property named 'xx' in 'class java.lang.String
- mybatis报错 There is no getter for property named 'xx' in 'class java.lang.String
- mybatis There is no getter for property named 'xx' in 'class java.lang.String
- mybatis There is no getter for property named 'xx' in 'class java.lang.String
- Mybatis异常There is no getter for property named 'XXX' in 'class java.lang.String'
- mybatis报错 There is no getter for property named 'xx' in 'class java.lang.String
- Mybatis异常There is no getter for property named 'XXX' in 'class java.lang.String
- 【异常】There is no getter for property named 'xxx' in 'class java.lang.String'
- mybatis报错 There is no getter for property named 'xx' in 'class java.lang.String
- SSM框架分页的时候报错 There is no getter for property named 'xx' in 'class java.lang.String
- 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.lang.String'
- Mybatis异常There is no getter for property named 'XXX' in 'class java.lang.String'
- mybatis There is no getter for property named 'xx' in 'class java.lang.String
- mybatis "There is no getter for property named 'xx' in 'class java.lang.String"问题
- mybatis There is no getter for property named 'xx' in 'class java.lang.String 没有写 xinwen.setsavetype
- mybatis There is no getter for property named 'xx' in 'class java.lang.String
- Mybatis-There is no getter for property named 'tj' in 'class java.lang.String'
- There is no getter for property named '**' in 'class java.lang.String'