Exposing ObjectMapper disables Spring Boot JacksonAutoConfiguration
See original GitHub issueExposing ObjectMapper used by JsonSerializer implemented here: https://github.com/spring-projects/spring-data-couchbase/pull/1132, disables Spring Boot JacksonAutoConfiguration#jacksonObjectMapper(), since it is annotated with @ConditionalOnMissingBean
.
It forces usage of Couchbase ObjectMapper Bean which disables Spring Boot Jackson customizations (properties, modules, …).
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Spring Boot Autoconfigured ObjectMapper plus additional ...
Our aim is to not override the spring auto configuration in class JacksonAutoConfiguration so that every customization by clients of the ...
Read more >JacksonAutoConfiguration (Spring Boot 3.0.0 API)
Auto configuration for Jackson. The following auto-configuration will get applied: an ObjectMapper in case none is already configured.
Read more >spring-boot/JacksonAutoConfiguration.java at main - GitHub
package org.springframework.boot.autoconfigure.jackson;. import java.lang.reflect. ... <li>an {@link ObjectMapper} in case none is already configured.</li>.
Read more >Configuring Spring Boot to use Gson instead of Jackson
Spring Boot uses Jackson by default for serializing and deserializing request and response objects in your REST APIs.
Read more >Spring Boot: Customize the Jackson ObjectMapper - Baeldung
By default, the Spring Boot configuration will disable the following: MapperFeature.DEFAULT_VIEW_INCLUSION; DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Right. Not sure what I was thinking.
@override ObjectMapper couchbaseObjectMapper(){ theObjectMapper = super.couchbaseObjectMapper(); theObjectMapper… // customizations return theObjectMapper; }
seems that removing the @Bean from couchbaseObjectMapper() would fix this.