Skip to content

Auto-configure Jackson mapper beans with a bean-based HandlerInstantiator #48711

@grassehh

Description

@grassehh

Hello,

In Spring Boot 3, the ObjectMapper configuration used to automatically configure a SpringHandlerInstantiator (through Jackson2ObjectMapperBuilder).

Now that Jackson2ObjectMapperBuilder is deprecated in favor of using Jackson builders, the new JacksonAutoConfiguration class does not configure JacksonHandlerInstantiator by default inside JsonMapper.

This results in my custom serializer to fail to instantiate now because it injects a bean/
It would be nice to recover this default behavior from Spring Boot 3 so that Spring Boot automatically configures JacksonHandlerInstantiator in the JsonMapper.

What do you think ?

Metadata

Metadata

Assignees

Labels

status: team-onlyAn issue that's best handled directly by the team rather than a community contribution.type: enhancementA general enhancement

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions