springboot项目打包webapp、resources和自定义文件夹

欢迎大家点一个关注,支持我的原创文章,谢谢!

springboot项目打包webapp、resources和自定义文件夹

 

1、打包 webapp和resources

<build>
    <resources>
        <resource>
            <directory>src/main/resources</directory>
	        <includes>
	            <include>**/**</include>
	        </includes>
            <!-- 开启过滤,用指定的参数替换directory下的文件中的参数 -->
	        <filtering>true</filtering>
	    </resource>
            
        <resource>
            <directory>src/main/webapp</directory>
            <targetPath>META-INF/resources</targetPath>
            <includes>
                <include>**/**</include>
            </includes>
        </resource>
         
    </resources>

</build>

2、打包自定义文件夹

<resource>
    <directory>src/main/resources/xmlTemplate</directory>
    <targetPath>xmlTemplate</targetPath>
</resource>

 

上一篇:SpringBoot在启动其项目后,访问不到webapp下的内容


下一篇:Docker容器互联