Maven在build中配置resources,防止资源导出失败的问题
<!--在build中配置resources,防止资源导出失败的问题-->
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</build>
<!--在Maven中设置资源导出时的编码格式-->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>