Spring Boot 静态资源设置缓存控制 Max-Age 返回头
Spring Boot About 176 words配置
返回头中会增加Cache-Control: max-age=31536000,且客户端会得到304状态码,表示服务端未修改,浏览器不会真正获取资源文件,使用本地缓存。
spring:
  web:
    resources:
      cache:
        cachecontrol:
          max-age: 365d
                Views: 2,230 · Posted: 2023-02-15
            
            ————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
        Loading...