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

昵称:
随便看看
换一批