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

本文来自博客园,作者:余生请多指教ANT,转载请注明原文链接:https://www.cnblogs.com/wangbiaohistory/p/12574436.html

浙公网安备 33010602011771号