在專案目錄裡的pom.xml裡修改或新增,保證所有xml和properties檔案必定會被編譯打包
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</build>
本作品採用《CC 協議》,轉載必須註明作者和本文連結