欢迎大家点一个关注,支持我的原创文章,谢谢!
1、打包 webapp和resources
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/**</include>
</includes>
<!-- 开启过滤,用指定的参数替换directory下的文件中的参数 -->
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/webapp</directory>
<targetPath>META-INF/resources</targetPath>
<includes>
<include>**/**</include>
</includes>
</resource>
</resources>
</build>
2、打包自定义文件夹
<resource>
<directory>src/main/resources/xmlTemplate</directory>
<targetPath>xmlTemplate</targetPath>
</resource>