異常之org.apache.ibatis.binding.BindingException

嚴重: Servlet.service() for servlet [springDispatcherServlet] in context with path [/meeting] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.wc.mapper.DeptMapper.findById] with root cause
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.wc.mapper.DeptMapper.findById
這裏寫圖片描述
這種錯誤“主要”是mapper.java 和mapper.xml文件有差異,
可能出現的問題有:
1、文件名有差異,會導致綁定失敗
2、mapper.xml 中的方法名與mapper.java中的方法名不對應
3、可能兩邊的參數或返回結果不一致。
4、其他問題
驗證步驟:
如果mapper.java中只有一個方法有誤,則可以能是是2、3中情況;
如果mapper.java中每個方法都有誤,則可能是1、4種情況,但個人認爲以1種情況爲主。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章