Skip to content
This repository was archived by the owner on Dec 9, 2025. It is now read-only.
This repository was archived by the owner on Dec 9, 2025. It is now read-only.

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

Description

@jntakpe

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions