-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FeignContentGzipEncodingAutoConfiguration
is throwing exception when okhttp
is not in the classpath
#2797
Comments
the same for |
Can you provide details of how to reproduce this, besides just not having OKHTTP on the classpath? What is the app doing? |
The application is not starting as the above exception is thrown while building the context |
OK I just need more details on how to reproduce it besides just excluding OKHTTP, can you provide a sample? |
Sure, will try.. This happened to all our applications but we have a framework between. Will try to create a minimal example |
I've the same problem. The problem is present only from 1.4.4 version. Looking at FeignContentGzipEncodingAutoConfiguration i discovered that in version 1.4.3 there is this condition @ConditionalOnBean(ApacheHttpClient.class) instead in version 1.4.4 the condition becomes @ConditionalOnMissingBean(OkHttpClient.class). The possible workaround is to set feign.compression.response.enabled=false or to leave the default value. |
I also encounter this issue when I upgraded spring-cloud-dependencies from "Edgware.SR2" to "Edgware.SR3", my temporary solution is set below 2 properties to 'false': |
Again, looking for a project that reproduces this. When I try this locally without OK HTTP on the classpath I am not getting the exception |
If the class is missing completely the exceptions is the expected outcome. This is for the same reason as ConditionalOnMissingClass only takes String value. The solution is to either use ConditionalOnMissingClass or set the type as a String ie. type in ConditionalOnMissingBean. |
@poulbildsoe yes i know the solution, I just cant get into a state where I see the issue. This is why I have asked multiple times for a project to reproduce this. |
…TP is not on the classpath. Fixes spring-cloud#2797
Avoid problems if OKHTTP is not on the classpath. Fixes #2797
Looks like the latest fix for #2462 broke some stuff.
We get this exception:
When we add
okhttp
to our classpath everything works fine again.Looks like this is causing the problem:
@ConditionalOnMissingBean(OkHttpClient.class)
The text was updated successfully, but these errors were encountered: