1. 程式人生 > >錯題集--org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):

錯題集--org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): 解決方法:

  1. mapper的namespace寫的不對!!!注意系修改。

2.UserDao的方法在UserDao.xml中沒有,然後執行UserDao的方法會報此

  1. UserDao的方法返回值是List,而select元素沒有正確配置ResultMap,或者只配置ResultType!

  2. 如果你確認沒有以上問題,請任意修改下對應的xml檔案,比如刪除一個空行

以上4中情況挨個試試吧,我是因為用自動生成外掛生成mapper檔案時包路徑寫錯了,所以報的錯。