如何使用Tomcat为Spring HttpInvoker请求启用GZIP压缩? [英] How enable GZIP compression for Spring HttpInvoker requests using Tomcat?

查看:84
本文介绍了如何使用Tomcat为Spring HttpInvoker请求启用GZIP压缩?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

想知道是否有人使用Tomcat为Spring HttpInvoker请求设置了GZIP压缩,并且需要执行哪些步骤?

Wondering if anyone has set up GZIP compression for Spring HttpInvoker requests using Tomcat, and what steps are necessary?

此外,关于是否真正值得的任何建议;尝试压缩基本上是序列化的Java对象有什么好处,还是它们的大小实际上并没有减少很多?

Also, any advice on whether it's actually worth it; is there much to be gained from trying to compress what are basically serialized Java objects, or do they not really reduce in size much?

谢谢

布莱恩

推荐答案

扩展SimpleHttpInvokerRequestExecutor并使用GZIPInput/Output-Stream

Extend SimpleHttpInvokerRequestExecutor and override the I/O methods with GZIPInput/Output-Stream example

这篇关于如何使用Tomcat为Spring HttpInvoker请求启用GZIP压缩?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆