SpringBoot项目启动Gzip压缩

在application.properties中添加配置信息:

#开启压缩功能
server.compression.enabled=true #压缩数据类型
server.compression.mime
-types=application/json,application/xml,text/html,text/xml,text/plain
#开启压缩最小数据字节数默认2048个字节
server.compression.min-response-size=2048

 

posted @ 2020-04-05 16:22  少帅928  阅读(1059)  评论(0编辑  收藏  举报