Skip to content

Add @ConditionalOnMissingBean JsonMapper bean declare #1181

@kihwankim

Description

@kihwankim

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

previously I was using spring boot: 2.6 spring cloud: 2021.0.5 and sprig-cloud-stream-binder-kafka, but we need to upgrade spring boot version from 2.6 to 3.3.3 and we got a trouble from a problem consumer broken caused by type casting error.
The error occurred in the JsonMassageConverter due to ObjectMapper read error. this error caused by using web-only ObjectMapper which is declared primary and not using ObjectMapper for Consumer.

Describe the solution you'd like
A clear and concise description of what you want to happen.

What about adding @ConditionalOnMissingBean(JsonMapper.class) this annotation on JsonMapperConfiguration.jsonMapper method which is for creating a bean?
then I think the user can declare the JsonMapper bean as they want

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

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