#bujiatang

导航

Maven中资源导出失败的解决方法

在build中配置resources,来防止我们资源导出失败的问题
在pom.xml核心配置文件中添加以下代码

<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>

posted on 2021-04-13 16:23  #bujiatang  阅读(102)  评论(0编辑  收藏  举报