MyBatis筆記(一)錯誤 Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not


Mapped Statements collection does not contain value for后面是什么類什么方法之類的: 
錯誤原因有幾種: 
1、mapper.xml中沒有加入namespace 
2、mapper.xml中的方法和接口mapper的方法不對應 
3、mapper.xml沒有加入到mybatis-config.xml中(即總的配置文件),例外:配置了mapper文件的包路徑的除外 
4、mapper.xml文件名和所寫的mapper名稱不相同。

最后對着各個po的mapper文件檢查了一遍,發現還是最開始的地方寫錯了也就是<association>那里寫錯了

參考:

https://blog.csdn.net/weixin_36722711/article/details/91350483


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM