欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

spring boot一个模块加载不到引用另一个模块的mapper.xml报错org.apache.ibatis.binding.BindingException: Invalid bound sta

发布时间:2024/10/5 编程问答 31 豆豆
生活随笔 收集整理的这篇文章主要介绍了 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的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。