1.修改yml配置文件
配置xml文件所在位置
mybatis-plus:
mapper-locations: classpath*:com/hn/renting/modules/**/mapper/xml/*Mapper.xml
2.修改pom.xml
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
</build>
3.编译项目后
xml文件出现在配置的位置说明成功了