In Spring Boot 3, the most popular Jackson modules were automatically detected via Jackson2ObjectMapperBuilder
.
In Spring Boot 4, since there is no Jackson2ObjectMapperBuilder
equivalent, and since Spring Boot configures its own JsonMapper
with Spring Framework infrastructure, that's not the case anymore so modules like the Kotlin one will not be configured anymore, introducing a surprising regression for end users, and impacting the DevXP.
To solve this challenge, Spring Framework 7 leverages by default Jackson module discovery mechanism based on service loader.
IMO it would make sense for Spring Boot 4 to enable automatically such modules (like the Kotlin one) as a kind of better successor to the hardcoded modules Jackson2ObjectMapperBuilder
. It would also increase the consistency between Spring Framework 7 and Spring Boot 4 default configuration. A property could be used to disable this behavior.