- 
                Notifications
    You must be signed in to change notification settings 
- Fork 41.6k
Description
I want to create a bean CsvMapper (or any other *Mapper), but if I create it then the autoconfigured default JsonMapper isn't created because there is @ConditionalOnMissingBean(ObjectMapper.class) and the CsvMapper extends ObjectMapper. This is problematic, and it can be unexpected behaviour. The only solution for this is to define a custom ObjectMapper with the same configuration as is in the autoconfiguration (copy paste code from the autoconfiguration).
If you change the condition to @ConditionalOnMissingBean(JsonMapper.class), then it is resolved and users can use multiple different *Mappers. The problem is that ObjectMapper is commonly used but if there is a new major version of Spring Boot 4 and if it uses the new version of Jackson 3, then it can be a good time to resolve it correctly.