参考:spring boot 设置 gzip 压缩
application.yml里配置server.compression
简写
server:compression:enabled: true
以下是默认配置,可以自己指定参数
server:compression:enabled: truemime-types: application/json,application/xml,text/xml,text/html,text/plain,text/javascript,text/css,application/javascriptmin-response-size: 2KB
