The documentation describes how to enable compression. But there is a condition on the Client that prevent auto-configuration whenever feign clients are annotated like @FeignClient(..., configuration = SomeConfig.class)

From the log:

FeignContentGzipEncodingAutoConfiguration: Did not match: - @ConditionalOnBean (types: feign.Client; SearchStrategy: all) did not find any beans of type feign.Client (OnBeanCondition) Matched: - @ConditionalOnClass found required class 'feign.Feign' (OnClassCondition) - @ConditionalOnProperty (feign.compression.request.enabled) matched (OnPropertyCondition)

It would be nice if you add support for that style of client configuration or add some informations for exemptions like these. By the way the interceptors using protected constructors, so i can't add them as beans to my SomeConfg class.

Kind regards,

Stefan Fellinger

Comment From: ryanjbaxter

So are you saying if you provide some custom configuration via the FeignClient annotation that then the FeignContentGzipEncodingAutoConfiguration doesnt kick in?

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: StefanFellinger

Yes, it doesn't kick in. Maybe because that way the client is registered later. But the autoconfiguration depends on it.

Ryan Baxter notifications@github.com schrieb am Mo., 27. Apr. 2020, 22:26:

So are you saying if you provide some custom configuration via the FeignClient annotation that then the FeignContentGzipEncodingAutoConfiguration doesnt kick in?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/spring-cloud/spring-cloud-openfeign/issues/323#issuecomment-620214928, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMAAQJQM26I64Y62P6AYFLROXS7LANCNFSM4MO7OZIA .

Comment From: OlgaMaciaszek

Was able to reproduce it. The conditional on Client seems unnecessary here. Will remove it.