Skip to content

Conversation

vpelikh
Copy link
Contributor

@vpelikh vpelikh commented Oct 6, 2025

Jackson sometimes used as transitive dependency (looking at spring-actuator), so it can casually end up in your classpath without your knowledge. This complicates json codec setup if you want to use something else. Spring-webmvc already have good solution to this problem, so I ported it to webflux. I don't think this is the best implementation, but it's definitely the simplest.

I will be glad to hear any suggestions.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 6, 2025
@vpelikh vpelikh force-pushed the Add-configuration-property-for-preferred-json-mapper-in-webflux branch 3 times, most recently from f9943df to 3daa029 Compare October 6, 2025 21:52
Signed-off-by: Vasily Pelikh <2010720+vasilypelikh@users.noreply.github.com>
@vpelikh vpelikh force-pushed the Add-configuration-property-for-preferred-json-mapper-in-webflux branch from 3daa029 to 2680329 Compare October 6, 2025 22:08
@hojooo
Copy link

hojooo commented Oct 10, 2025

To extend this concept to WebFlux, would it be more consistent to use the existing key "spring.http.converters.preferred-json-mapper" as the common entry point rather than introducing a new one "spring.http.codecs.preferred-json-mapper"?

@vpelikh
Copy link
Contributor Author

vpelikh commented Oct 11, 2025

To extend this concept to WebFlux, would it be more consistent to use the existing key "spring.http.converters.preferred-json-mapper" as the common entry point rather than introducing a new one "spring.http.codecs.preferred-json-mapper"?

Thanks for suggestion.

As I understood spring-http-codecs module is webflux alternative to webmvc's spring-http-conveters and it would not be very good to mix these concepts, even at the configuration level. Also spring already have some properties under spring.http.codecs so it can be confusing to users.

I also think that merging http-codecs with http-converters might be a good idea, but it is out of scope of this MR.

@wilkinsona
Copy link
Member

You're correct, @vpelikh, that property should not be used to influence both HTTP codecs and HTTP message converters. Please leave things as they are and we'll review your proposal more fully in due course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants