码迷,mamicode.com
首页 > 编程语言 > 详细

org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'fundId' in 'class java.lang.Integer'

时间:2015-08-04 11:02:21      阅读:930      评论:0      收藏:0      [点我收藏+]

标签:

Struts Problem Report

Struts has detected an unhandled exception:

Messages:

  1. There is no getter for property named ‘fundId‘ in ‘class java.lang.Integer‘
  2. nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘fundId‘ in ‘class java.lang.Integer‘

Stacktraces

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘fundId‘ in ‘class java.lang.Integer‘

 

改错:

在mybatis     mapper.java中,正常来说,单个参数或者实体传入,不需要加:@Param("fundId")

但如果   mapper.xml中有

     <if test=" fundId!=0">
        and i.fundId = #{fundId} 
     </if>

这样的判断的话,就必须要在mapper.java中参数传入时加上:@Param("fundId")。

估计是因为 mapper.xml的配置信息必须要用注解的方式进行注入。

org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'fundId' in 'class java.lang.Integer'

标签:

原文地址:http://www.cnblogs.com/JustForJava/p/4701209.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!