Skip to content

Explicitly set response Content-Type in @ResponseBody [SPR-6702] #11368

@spring-projects-issues

Description

@spring-projects-issues

Arjen Poutsma opened SPR-6702 and commented

It would be useful to override the default content-type written by the HttpMessageConverters in the @ResponseBody annotation. Something like:

@ResponseBody("foo/bar")
public String myHandlerMethod() {
  return "myFooBar";
}

Issue Links:

10 votes, 15 watchers

Metadata

Metadata

Assignees

Labels

has: votes-jiraIssues migrated from JIRA with more than 10 votes at the time of importin: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions