我有一个 spring boot API,我已经使用以下属性启用了 HTTP 响应压缩。
server:
compression:
enabled: true
mime-types: text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json
min-response-size: 1024
我在属性更改前后在 postman 上本地测试了 API,压缩后它没有减少响应大小,我的响应大小为 280 KB。但我可以看到响应 header 包含内容编码为 gzip 和传输编码是分块的。
那么知道为什么响应大小没有减少吗?
最佳答案
请使用firefox或chrome, postman 只显示最终尺寸,哈哈
关于spring-boot - Spring Boot gzip 压缩 - 响应大小没有减少,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62407271/