在pom文件下添加
<build>
<!--识别非resources资源目录下的xml配置文件-->
<resources>
<resource>
<directory>src/main/java</directory> <!---设置编译的包-->
<includes>
<include>com.hn.mapper/*.xml</include> <!---该路径下的.xml类型文件也要编译-->
</includes>
</resource>
</resources>
</build>