Skip to content
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

JacksonAutoConfiguration should retain modules registered in Jackson2ObjectMapperBuilderCustomizer with higher precedence rather than overwriting them #42836

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nosan
Copy link
Contributor

@nosan nosan commented Oct 22, 2024

@nosan nosan changed the title JacksonAutoConfiguration should retain modules registered in Jackson2ObjectMapperBuilderCustomizer with higher precedence, rather than overwriting them JacksonAutoConfiguration should retain modules registered in Jackson2ObjectMapperBuilderCustomizer with higher precedence rather than overwriting them Oct 22, 2024
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 22, 2024
…ObjectMapperBuilderCustomizer with higher precedence, rather than overwriting them
@mhalbritter mhalbritter added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 28, 2024
@mhalbritter mhalbritter added this to the 3.5.x milestone Oct 28, 2024
snicoll pushed a commit to snicoll/spring-boot that referenced this pull request Nov 18, 2024
Previously, the default Jackson2ObjectMapperBuilderCustomizer
implementation did set the list of modules to use. This had the effect
of removing any modules that were registered programmatically by a
customizer with higher precedence.

This commit uses the variant of modulesToInstall that retain any
existing modules. It also adds a note in the documentation as this
behavior can be easily missed.

See spring-projectsgh-42836
snicoll added a commit to snicoll/spring-boot that referenced this pull request Nov 18, 2024
@snicoll snicoll self-assigned this Nov 18, 2024
@snicoll
Copy link
Member

snicoll commented Nov 18, 2024

This PR has been reviewed and is ready to go once we branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants