I have a RestEasy + Java EE application. When I add @GZIP to a component class, the server-answer is gzipped, if the client sends "accepts:gzip"
Is there a way to generally enable gzip for all components? I don't like to add the annotation to every class.
I'm using RestEasy JAX-RS 3.0.1
if you are implementing your API behind an interface, so all your interfaces might inherit from one interface let us name is "BaseAPI" and logically if you set @Gzip on the BaseAPI so it would apply Content-Encoding for all inherited interfaces and method.
@GZIP
public interface BaseAPI
{
}
public interface APIX extends BaseAPI
{
@GET
Response getSomething() {
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With