@ConditionalOnMissingBean means your bean wins; the starter only fills in what you did not supply.
// Spring Boot would auto-configure an ObjectMapper. Define one and yours is used:
@Configuration
class JacksonConfig {
@Bean
ObjectMapper objectMapper() {
return JsonMapper.builder()
.addModule(new JavaTimeModule())
.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
.build();
}
}
Boot's JacksonAutoConfiguration is annotated @ConditionalOnMissingBean,
so it steps aside and your ObjectMapper is the one injected everywhere.
Run this yourself in the Online Java Compiler, spin up a live REST API in the API Sandbox, or practise with Java interview questions.
Published 2026-08-11