Struts Problem Report
Struts has detected an unhandled exception:
Messages:
- There is no getter for property named ‘fundId‘ in ‘class java.lang.Integer‘
- 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'
时间: 2024-10-13 14:34:40