2019-06-12

Spring-Boot随文件系统动态载入静态资源

在application.properties中加入file:/类型静态目录定义,不要忘记了classpath下的static


spring.resources.static-locations=classpath:/static/,file:/opt/tools/html/

在启动jar时,使用

--spring.config.location=application.properties
路径来使用自定义配置

没有评论:

发表评论