Skip to content

Spring MVC - Ability to use a Converter based on the Path Extension instead of Accep Header. [SPR-8546] #13190

@spring-projects-issues

Description

@spring-projects-issues

Vijay Dendukuri opened SPR-8546 and commented

When "RequestResponseBodyMethodProcessor" is used to handle the return value (by annotating the method with @ResponseBody), the HttpMessageConverter is choosen based on request header "Accept".

Please provide an ability to also choose a HttpMessageConverter based on pathExtension (similar to ContentNegotiatingViewResolver).

The HtppMessageConverter is choosed in the following class now.
org.springframework.web.servlet.mvc.method.annotation.support.AbstractMessageConverterMethodProcessor
Method: writeWithMessageConverters


Affects: 3.0.5

Issue Links:

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

Relationships

None yet

Development

No branches or pull requests

Issue actions