Skip to content

Fix deprecation for the MappingJacksonParameterizedConverter #3930

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

Open
artembilan opened this issue May 28, 2025 · 11 comments
Open

Fix deprecation for the MappingJacksonParameterizedConverter #3930

artembilan opened this issue May 28, 2025 · 11 comments
Assignees
Milestone

Comments

@artembilan
Copy link
Member

The MappingJackson2MessageConverter is deprecated for removal in Spring Framework 7.0 in favor of JacksonJsonMessageConverter.

Related to: spring-projects/spring-framework#33798

@chickenchickenlove
Copy link
Contributor

Hi, @artembilan
Would it be okay for me to handle this issue?

@sobychacko
Copy link
Contributor

@chickenchickenlove I say go for it.

@artembilan
Copy link
Member Author

Not yet.
See related Spring Framework issue: spring-projects/spring-framework#34963

@chickenchickenlove
Copy link
Contributor

roger that.
I've got it!

@chickenchickenlove
Copy link
Contributor

@artembilan
I have a question.

Would it be okay to create PR for spring-projects/spring-framework#34963?
I’m not sure whether you are waiting for the framework team’s work or if it’s acceptable to work on another contributor’s PRs.

If it’s the latter, would it be alright for me to open a PR?

@artembilan
Copy link
Member Author

Thank you for offer, @chickenchickenlove !
Yes, you can issue PR in the Framework project.
That might expedite feedback loop.
However, we are not in rush for this issue.
You cannot find anything else to work on? 😉

@artembilan
Copy link
Member Author

FYI, the required issue in the Framework has been fixed.
Feel free to contribute this migration to a new API!
Thanks

@artembilan
Copy link
Member Author

There was misunderstanding from my side.
The new JacksonJsonMessageConverter in Spring Framework is for Jackson 3.
While it is recommended for end-users to migrate to Jackson 3 and that is how we got an encourage from that deprecated MappingJackson2MessageConverter, but that does not mean that we have a freedom in library like this ours Spring for Apache Kafka and make decision for consumers of it.
Therefore we have to go here slightly different direction:

  1. Manage Jackson 3 dependency.
  2. Implement a MappingJacksonParameterizedConverter variant for that Jackson 3 based JacksonJsonMessageConverter
  3. And deprecated existing for Jackson 2.

This way, even if we phasing out Jackson 2 support, that does not mean that we drop it off altogether.
After that we would need to think about all the places where we use Jackson 2 directly, e.g. DefaultKafkaHeaderMapper and Json(De)Serializer.
Looks like Spring Framework has Jackson 3 variants for all the possible converters and encoders, e.g. new AbstractJacksonHttpMessageConverter.

@sobychacko
Copy link
Contributor

Ya, eventually, I think we should migrate all our Jackson support to the new one.

@sobychacko
Copy link
Contributor

@chickenchickenlove We can look at this issue since we need to tackle a bunch of external dependencies, deprecations, etc., and then coordinate with the framework changes. Were you already in the process of making any changes?

@chickenchickenlove
Copy link
Contributor

@sobychacko
Sorry to late 🙇‍♂
I just took a look code about how to deal with this problem and I didn't start making any changes with code.
So, If you want to take this task, please go ahead.
Sorry for inconvenience. 🙇‍♂

@sobychacko sobychacko self-assigned this Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants