pom.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>
评论