springboot 多模块下mapper分散的解决方法

springboot项目结构

由于mapper.xml分布在不同的模块中,

mybatis.mapperLocations=classpath:mapper/*.xml 不能两个模块中mapper文件夹下的xml文件不能加载

这是因为classpath只加载了一个mapper的改成

mybatis.mapperLocations=classpath*:mapper/*.xml

解决问题

猜你喜欢

转载自blog.csdn.net/lee9289/article/details/82746700