已解决org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection

完美解决org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection_spring


文章目录

  • 报错问题
  • 解决方法
  • 声明


报错问题

粉丝群里面的一个小伙伴敲代码时发生了报错(当时他心里瞬间凉了一大截,跑来找我求助,然后顺利帮助他解决了,顺便记录一下希望可以帮助到更多遇到这个bug不会解决的小伙伴),报错信息如下:

mybatis的mapper.xml报了There is no getter for property named 'xxx’异常

我遇到的问题,项目启动后报了标题的异常就很奇怪,我写的查询对象明明这个属性已经注释了为什么会提示未找到该属性的get方法呢?
原因sql的xml中写了这个属性后注释掉了 /#{xxx}, #{yyy}/mybatis仍然把#{xxx}当成了参数

完美解决org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection_xml_02

解决方法

解决方法如下

完美解决org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection_mybatis_03

删除注释或者使用

声明

解决方法参考网络,如有侵权联系我删除