Skip to content

AnnotationDrivenBeanDefinitionParser should allow injection of custom HttpMessageConverter's [SPR-7091] #11751

@spring-projects-issues

Description

@spring-projects-issues

Kasra Rasaee opened SPR-7091 and commented

  1. There should be a way to inject custom http message converters into AnnotationDrivenBeanDefinitionParser. Currently its hardcoded and set to a private method

private ManagedList<RootBeanDefinition> getMessageConverters(Object source) { ... }

  1. AnnotationMethodHandlerAdapter has hardcoded the HttpMessageConverters as well, when replacing the bean with something like

    <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
    <property name="messageConverters">
    <list>
    <ref bean="customConverter"/>
    </list>
    </property>
    </bean>

The AnnotationMethodHandlerAdapter bean is never replaced within the Spring Context.

Please let me know if there is a different solution?


Affects: 3.0.1, 3.0.2

Issue Links:

4 votes, 5 watchers

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issuetype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions