用于解决maven项目编译后xml文件丢失问题。
直接在maven的项目中直接添加以下配置代码即可。
<build> <!--配置maven对resources文件过滤--> <resources> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.xml</include> <include>**/*.properties</include> </includes> <filtering>true</filtering> </resource> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> <include>**/*.properties</include> </includes> <filtering>true</filtering> </resource> </resources> </build>