解决配置文件无法导出或者无法生效
Maven由于“约定大于配置”的特性,可能会遇到配置文件无法导出或者无法生效的问题。在核心配置文件pom.xml添加如下代码。
<!--在build中配置resoureces,来防止我们资源导出失效的问题-->
<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>
我寻见一片海 碧蓝且耀着光
大片船只航行其上 都向着远方
Shared by Foriver_江河