maven配置注意事项
程序员文章站
2022-07-14 20:33:25
...
maven配置注意事项
1、不导出自己写的配置文件问题
由于maven的约定大于配置,我们可能会遇到我们写的配置文件无法被导出或者生效的问题,解决方案:
<!--在build中配置resource来防止我们资源导出失败的问题-->
<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>
上一篇: Nginx配置注意事项
下一篇: Dubbo 配置注意事项