there is no getter for proper
时间: 2023-08-21 17:16:18 浏览: 216
引用\[1\]:如果加上了,会报错: Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘id’ in ‘class java.lang.Long’ <if test="id != null"> and c.id = #{id, jdbcType=BIGINT} </if>。 引用\[2\]:Thu Jun 11 16:24:17 CST 2020 There was an unexpected error (type=Internal Server Error, status=500). nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘gmt_create’ in ‘class com.lxl.community.model.Question’ 。 引用\[3\]:<mapper namespace="com.mybatis.test.dao.UserMapper"> <select id="queryUserByName" parameterType="String" resultType="java.util.HashMap"> select t_id as id, t_name as name, t_password as password from mybatis_user where 1=1 <if test="name != null"> and t_name=#{name} </if> order by t_id </select> </mapper> 。
问题:there is no getter for proper
回答: 根据提供的引用内容,报错信息显示在某些类中没有名为‘id’或‘gmt_create’的属性的getter方法。这可能是因为在使用这些属性时没有正确定义getter方法,导致MyBatis无法找到对应的属性。要解决这个问题,需要在相应的类中添加正确的getter方法来获取这些属性的值。
#### 引用[.reference_title]
- *1* [ibatis.reflection.ReflectionException: There is no getter for property named ‘id‘ in ‘class java....](https://blog.csdn.net/nys_1923/article/details/118029167)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for proper](https://blog.csdn.net/qinleilei7760631/article/details/121580917)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [错误解决:There is no getter for property named 'id' in class 'java.lang.String'](https://blog.csdn.net/u011897392/article/details/46738747)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文