springboot静态资源路径制定

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

posted @ 2020-03-26 14:49  余生请多指教ANT  阅读(1161)  评论(0编辑  收藏  举报