0
点赞
收藏
分享

微信扫一扫

org.mybatis.spring.MyBatisSystemException nested exception is org.apache.ibatis.reflection

Mhhao 2022-03-30 阅读 56
java后端

在mybatis的xml中注释有风险,编写需谨慎

mybatis的mapper.xml报了There is no getter for property named 'xxx’异常
  • 我遇到的问题,项目启动后报了标题的异常就很奇怪,我写的查询对象明明这个属性已经注释了为什么会提示未找到该属性的get方法呢?
  • 原因sql的xml中写了这个属性后注释掉了 /*#{xxx}, #{yyy}*/mybatis仍然把#{xxx}当成了参数
  • 解决方法
  • 删除注释或者使用<!-- -->
举报

相关推荐

0 条评论