mybatis Resolved exception caused by handler execution: org.mybatis.spring.MyBatisSystemException

Resolved exception caused by handler execution: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'record' in 'class com.nice.model.Question'

 

mybatis接口方法参数前加上@Param注解

 

或者#{实体类名.参数名}  换成#{参数名} 不加param注解也行

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
引用中的异常信息提到了一个MyBatis系统异常,具体错误信息是org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'certno' in 'class java.lang.String'。而引用中的异常信息是org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='name', mode=IN, javaType=class java.lang.Integer, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #2 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.lang.ClassCastException: java.base/java.lang.String cannot be cast to java.base/java.lang.Integer。最后引用中的异常信息是Could not set parameters for mapping: ParameterMapping{property='cardFee', mode=IN, javaType=class java.lang.Object, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #4 with JdbcType null。 根据这些异常信息,可以推测引起这个MyBatis系统异常的原因可能是参数类型不匹配。根据引用和引用的内容,可能是某个属性的类型不正确,比如在引用中的'certno'属性应该是一个字符串类型,但是被错误地当作了一个整数类型来处理。类似地,在引用中的'name'属性也出现了类似的问题,被错误地当成了整数类型处理。引用中的异常信息没有提供具体的属性名,但是也可以推测是同样的类型匹配问题。 为了解决这个问题,需要检查MyBatis的配置文件,确保映射的属性类型与数据库中的数据类型一致。另外,还需要检查代码中的参数传递,确保参数类型正确。如果仍然无法解决问题,可以考虑使用不同的JdbcType或尝试其他配置属性来解决问题。 总结起来,这个MyBatis系统异常是由于参数类型不匹配导致的,可以通过检查配置文件和代码中的参数类型来解决。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [解决Mybatis系统异常org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis....](https://blog.csdn.net/qq_35759451/article/details/109575752)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException](https://blog.csdn.net/qq_43593107/article/details/121136995)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [【异常及源码分析】org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis....](https://blog.csdn.net/weixin_30515513/article/details/97497743)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值