设置缓存时间
spring.web.resources.cache.period=3600
设置服务器响应时间(3600秒)
spring.web.resources.cache.cachecontrol.max-age=3600
设置检查资源是否变化,如果没变化则返回本地资源(304),如果变化则向浏览器请求资源。
#springboot默认设置为true
spring.web.resources.cache.use-last-modified=true
自定义静态资源文件夹位置
spring.web.resources.static-locations=classpath:/mystatic/
自定义webjars路径前缀
spring.mvc.webjars-path-pattern=/wj/**
自定义静态资源访问路径(如果不自定义,static下的资源可以直接访问)
spring.mvc.static-path-pattern=/static/**