Skip to content
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

@ConditionalOnMissingBean targeting ConverterFactory.class instead of Converter.Factory.class #54

Open
jntakpe opened this issue Sep 13, 2022 · 0 comments

Comments

@jntakpe
Copy link

jntakpe commented Sep 13, 2022

Describe the bug
I'm using both spring-cloud-square-retrofitand spring-cloud-square-retrofit-core dependencies. I've declared a Retrofit Converter.Factory for kotlinx.serialization.
Unfortunately this Converter.Factory bean is registered together with the SpringConverterFactory declared in the DefaultRetrofitClientConfiguration because this bean is declared with @ConditionalOnMissingBean(ConverterFactory.class) targeting Spring's ConverterFactory class instead of Retrofit's Converter.Factory class.
It results in having the SpringConverterFactory called instead of my custom Retrofit.Factory

Sample
To fix replace @ConditionalOnMissingBean(ConverterFactory.class) in @ConditionalOnMissingBean(Converter.Factory.class) in the DefaultRetrofitClientConfiguration class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant