pom文件配置
<build>
<!-- 将mapper.xml一起打包 -->
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
</build>
原文链接:https://www.f2er.com/maven/997341.html