diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java index 4ea7e7e6ab248be32bc7f5c43a45250f1f4d1a2c..00c9a52f9275717a055863f24a7c7a2d193941f1 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java @@ -331,8 +331,13 @@ public @interface RequestMapping { /** * The consumable media types of the mapped request, narrowing the primary mapping. - *

The format is a sequence of media types ("text/plain", "application/*), + *

The format is a single media type or a sequence of media types, * with a request only mapped if the {@code Content-Type} matches one of these media types. + * Examples: + *

+	 * consumes = "text/plain"
+	 * consumes = {"text/plain", "application/*"}
+	 * 
* Expressions can be negated by using the "!" operator, as in "!text/plain", which matches * all requests with a {@code Content-Type} other than "text/plain". *

Supported at the type level as well as at the method level! @@ -345,8 +350,13 @@ public @interface RequestMapping { /** * The producible media types of the mapped request, narrowing the primary mapping. - *

The format is a sequence of media types ("text/plain", "application/*), + *

The format is a single media type or a sequence of media types, * with a request only mapped if the {@code Accept} matches one of these media types. + * Examples: + *

+	 * produces = "text/plain"
+	 * produces = {"text/plain", "application/*"}
+	 * 
* Expressions can be negated by using the "!" operator, as in "!text/plain", which matches * all requests with a {@code Accept} other than "text/plain". *

Supported at the type level as well as at the method level!