The documentation for RESTEasy says that in addition to annotating your server endpoint with the "@GZIP" annotation, you need to make a file called "javax.ws.rs.ext.Providers" available in the classpath of your runtime environment and include the classname "org.jboss.resteasy.plugins.interceptors.encoding.GZIPEncodingInterceptor" in the file.
I've done all of the above, but the response coming back from the server is NOT compressed, even though the response "Content-Encoding" header is "gzip" (i.e. the response body is plain text/json, despite what the header says).
The javax.ws.rs.ext.Providers file is definitely in my WEB-INF/classes folder in the .war and in the app folder when deployed to Tomcat, but RESTEasy is ignoring it.
So, is there something I'm missing? Does anyone have this working?
EDIT: Okay, I discovered that RESTEasy is actually looking for the full path "META-INF/services/javax.ws.rs.ext.Providers", so I had to create that folder path plus file in my resources folder. And yes, that is confusing, since there is already a META-INF folder in the .war archive; however, putting the "services" sub-folder and "javax.ws.rs.ext.Providers" file in that META-INF folder does NOT work. Sigh.