Skip to content

Remove charset parameter from Spring MVC JSON content type #22954

Closed
@sdeleuze

Description

@sdeleuze

With #22788, MediaType#APPLICATION_JSON_UTF8 is deprecated an WebFlux default content type for JSON is Content-Type: application/json but based on my tests with Spring MVC it is still Content-Type: application/json;charset=UTF-8. I suspect it is caused by

((ServletServerHttpResponse)outputMessage).getServletResponse().setCharacterEncoding("UTF-8");
.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions