关于mybatis报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)的解决方法

时间:2020-07-04 09:48:34   收藏:0   阅读:50

今天在练习使用springboot通过mapper和xml方式整合mybatis时发生报错,通过百度大佬们的解决方法发现都不行。最后发现是我的xml文件没有按照传统的maven架构进行放置。

因为springboot使用的是maven架构,xml文件必须放到src/main/resource下才能被maven build plugin扫描到。

以下是错误的配置方式:

技术分享图片

 

 以下是正确的配置方式:

 技术分享图片

 

 如果你遇到了同样的问题但不是犯我这样的错误的话建议看一下这篇博文:https://www.jianshu.com/p/a9516bcd3cb0

 希望对你能有所帮助。

 

原文:https://www.cnblogs.com/foreveraries/p/13233419.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!