解决办法 在pom.xml中插入以下配置
1 <build> 2 <resources> 3 <resource> 4 <directory>src/main/java</directory> 5 <includes> 6 <include>**/*.xml</include> 7 </includes> 8 </resource> 9 <resource> 10 <directory>src/main/resources</directory> 11 </resource> 12 </resources> 13 </build>