How enable GZIP compression for Spring HttpInvoker

2019-07-23 12:40发布

问题:

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

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?

Thanks,

Brian

回答1:

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



回答2:

If you can put Apache in front of Tomcat then you'd do it using Apache web server