-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
3.0Issue planned for initial 3.0 releaseIssue planned for initial 3.0 release
Description
Is your feature request related to a problem? Please describe.
With Jackson 3, Spring Framework 7 is switching to using the Jackson support for service loader to enable Jackson modules by default. It would be very useful for us to have a MapperBuilder#findAndAddModules(ClassLoader)
along to the current MapperBuilder#findAndAddModules()
shortcut to promote this as a first class use case within the Spring portfolio. Any chance you could add it?
Describe the solution you'd like
We would like to be be able to write:
public MappingJacksonHttpMessageConverter() {
this(JsonMapper.builder()
.findAndAddModules(MappingJacksonHttpMessageConverter.class.getClassLoader())
.build());
}
Instead of:
public MappingJacksonHttpMessageConverter() {
this(JsonMapper.builder()
.addModules(MapperBuilder.findModules(MappingJacksonHttpMessageConverter.class.getClassLoader()))
.build());
}
Usage example
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
3.0Issue planned for initial 3.0 releaseIssue planned for initial 3.0 release
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
cowtowncoder commentedon Apr 25, 2025
Since there are both
that seems very much doable, will add.
Fixes #5112: add `ObjectMapper.findAndAddModules(...)` variant
Fixes #5112: add `ObjectMapper.findAndAddModules(...)` variant (#5114)
cowtowncoder commentedon Apr 25, 2025
Fixed via #5114.