SpringBoot后端开启gzip压缩

在springboot配置文件中添加这两行即可

# 开启压缩
server.compression.enabled=true
server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain

你可能感兴趣的:(springboot)