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}當成了參數
  • 解決方法
  • 刪除註釋或者使用<!-- -->
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章