Skip to content

Add equivalent of JAX-RS @Consumes to Spring MVC [SPR-7354] #12013

@spring-projects-issues

Description

@spring-projects-issues

Keith Donald opened SPR-7354 and commented

As a Spring MVC user, I would like the option to explicitly specify the media types a @Controller can accept. If a client POSTs a request body that is not of one of those media types, the server should return the UNSUPPORTED_MEDIA_TYPE (415) status.

We should pursue semantic alignment with JAX-RS where possible. See http://jackson.codehaus.org/javadoc/jax-rs/1.0/javax/ws/rs/Consumes.html for a description of how JAX-RS supports this feature.


Affects: 3.0.3

Issue Links:

4 votes, 2 watchers

Metadata

Metadata

Assignees

Labels

in: 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