Skip to content

Add @ConditionalOnMissingBean JsonMapper bean declare #1181

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

Closed
kihwankim opened this issue Sep 8, 2024 · 0 comments · Fixed by #1182
Closed

Add @ConditionalOnMissingBean JsonMapper bean declare #1181

kihwankim opened this issue Sep 8, 2024 · 0 comments · Fixed by #1182

Comments

@kihwankim
Copy link
Contributor

kihwankim commented Sep 8, 2024

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.

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

Successfully merging a pull request may close this issue.

1 participant