首页 > 编程语言 > 详细

springboot静态资源路径制定

时间:2020-03-26 15:47:51      阅读:72      评论:0      收藏:0      [点我收藏+]

spring.resources.static-location参数指定了Spring Boot-web项目中静态文件存放地址,

该参数默认设置为:

classpath:/static,

classpath:/public,

classpath:/resources,

classpath:/META-INF/resources,

servlet context:/ 自定义目录需要指定

例如:spring.resources.static-locations=

classpath:templates/ resources

目录下去除后缀 在resources的html目录下

spring.mvc.view.prefix=/html

后缀为.html

spring.mvc.view.suffix=.html

技术分享图片

springboot静态资源路径制定

原文:https://www.cnblogs.com/wangbiaohistory/p/12574436.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!