Skip to content

Unable to configure MappingJacksonHttpMessageConverter created by AnnotationDrivenBeanDefinitionParser [SPR-7924] #12579

@spring-projects-issues

Description

@spring-projects-issues

Joern Huxhorn opened SPR-7924 and commented

org.springframework.web.servlet.config.AnnotationDrivenBeanDefinitionParser
executes
messageConverters.add(createConverterBeanDefinition(MappingJacksonHttpMessageConverter.class, source));
at line 187 in spring-webmvc-3.0.5.RELEASE

There is no way that I'm aware of to configure the created MappingJacksonHttpMessageConverter instance.

I'd need to set the ObjectMapper of this instance so it's able to use my MixIn configuration (special handling of certain data types defined using serializationConfig.addMixInAnnotations or deserializationConfig.addMixInAnnotations) and other ObjectMapper configuration.

Otherwise, serializing e.g. a java.awt.Dimension is guaranteed to explode.

Is there any way to configure it that I'm missing? I searched quite extensive but couldn't find anything so far. Any workaround would be highly appreciated, even a hacky, temporary one...

This issue may be related to #11397.


Affects: 3.0.5

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions