springboot2.6.x 使用外部静态文件
0 条评论1、配置外部地址,static-locations。修改application.yml
spring:
web:
resources:
static-locations: file:./static/
2、打包发布排除资源文件,修改 pom.xml
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>static/**</exclude>
</excludes>
</resource>
</resources>