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

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

mybatis的mapper.xml报了There is no getter for property named 'xxx’异常
  • 我遇到的问题,项目启动后报了标题的异常就很奇怪,我写的查询对象明明这个属性已经注释了为什么会提示未找到该属性的get方法呢?
  • 原因sql的xml中写了这个属性后注释掉了 /*#{xxx}, #{yyy}*/mybatis仍然把#{xxx}当成了参数
  • 解决方法
  • 删除注释或者使用<!-- -->
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章