MAVEN项目无法读取Mybatis配置核心xml文件

1 如下代码直接复制到pom.xml文件下。


<!-- 项目打包时会将java目录中的*.xml文件也进行打包 -->
<build> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> </resources> </build>

2 在Spring Boot配置文件中添加配置

#配置mapper xml文件的路径
mybatis-plus.mapper-locations=classpath:com/atguigu/eduservice/mapper/xml/*.xml

 

posted @ 2021-02-20 13:23  键盘_书生  阅读(49)  评论(0编辑  收藏  举报