maven中静态资源的过滤
pom.xml文件中加入下面配置
可以过滤java和resources文件夹里面所有的的.properties和.xml文件
directory:指定资源所在的目录,目录的路径是相对于pom.xml文件的 includes:指定要包含哪些文件 filtering标签中:false表示不过滤,true表示过滤
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
注意:本文归作者所有,未经作者允许,不得转载