spring boot一个模块加载不到引用另一个模块的mapper.xml报错org.apache.ibatis.binding.BindingException: Invalid bound sta
生活随笔
收集整理的這篇文章主要介紹了
spring boot一个模块加载不到引用另一个模块的mapper.xml报错org.apache.ibatis.binding.BindingException: Invalid bound sta
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
場景:parent項目有兩個子模塊,分別是shiro和server,兩個子模塊各自有各自的實體類、mapper,然后server需要引用shiro中的實體類和mapper。已經在啟動類添加注解配置掃描包了,結果還是報錯org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)。
解決方案:在server的配置文件中配置mapper地址修改為掃描所有即可。
修改前:
| mybatis-plus.mapper-locations=classpath:/mapper/**.xml |
修改后:
| mybatis-plus.mapper-locations=classpath*:mapper/*.xml |
?
總結
以上是生活随笔為你收集整理的spring boot一个模块加载不到引用另一个模块的mapper.xml报错org.apache.ibatis.binding.BindingException: Invalid bound sta的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: spring boot多模块项目一个模块
- 下一篇: The POM for com.ruif