Enhancement
Today there is an option to provide custom annotationIntrospector to the Jackson2ObjectMapperBuilder via Jackson2ObjectMapperBuilderCustomizer:
@Bean
public Jackson2ObjectMapperBuilderCustomizer myCustomizer() {
return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.annotationIntrospector(new MyIntrospector());
}
However, in that way I'm replacing existing introspector. So if some other introspectors were added by some libs - they will be just lost and today there seems to be no option to extend existing ones instead.
Would be good to adjust org.springframework.http.converter.json.Jackson2ObjectMapperBuilder to either provide some way to get currently configured annotationIntrospector (so that I can use something like AnnotationIntrospector.pair to combine it with mine) or to have some other way to add new introspector to current one instead of replacing it.
Enhancement
Today there is an option to provide custom
annotationIntrospectorto theJackson2ObjectMapperBuilderviaJackson2ObjectMapperBuilderCustomizer:However, in that way I'm replacing existing
introspector. So if some other introspectors were added by some libs - they will be just lost and today there seems to be no option to extend existing ones instead.Would be good to adjust
org.springframework.http.converter.json.Jackson2ObjectMapperBuilderto either provide some way to get currently configuredannotationIntrospector(so that I can use something likeAnnotationIntrospector.pairto combine it with mine) or to have some other way to add new introspector to current one instead of replacing it.