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

一点点学习,一丝丝进步。不懈怠,才不会被时代淘汰
原文地址:https://www.cnblogs.com/wangbiaohistory/p/12574436.html