版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/loverycjj/article/details/79899245
springboot
如果Web服务使用Spring Boot并且运行在Tomcat或者Jetty中,支持gzip压缩可以通过在application.properties中添加下面两条属性来实现。
server.compression.enabled=true
server.compression.mime-types=application/json
这个属性样板打开了压缩选项,这样稍后应用到JSON正文的压缩就有保证了。