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