Skip to content

Commit 5959de5

Browse files
committed
Merge pull reqest #92 from DavidBiesack/master
* DavidBiesack-master: Minor fix in Javadoc for RequestMapping
2 parents 277a115 + 7cd0b16 commit 5959de5

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,13 @@
331331

332332
/**
333333
* The consumable media types of the mapped request, narrowing the primary mapping.
334-
* <p>The format is a sequence of media types ("text/plain", "application/*),
334+
* <p>The format is a single media type or a sequence of media types,
335335
* with a request only mapped if the {@code Content-Type} matches one of these media types.
336+
* Examples:
337+
* <pre>
338+
* consumes = "text/plain"
339+
* consumes = {"text/plain", "application/*"}
340+
* </pre>
336341
* Expressions can be negated by using the "!" operator, as in "!text/plain", which matches
337342
* all requests with a {@code Content-Type} other than "text/plain".
338343
* <p><b>Supported at the type level as well as at the method level!</b>
@@ -345,8 +350,13 @@
345350

346351
/**
347352
* The producible media types of the mapped request, narrowing the primary mapping.
348-
* <p>The format is a sequence of media types ("text/plain", "application/*),
353+
* <p>The format is a single media type or a sequence of media types,
349354
* with a request only mapped if the {@code Accept} matches one of these media types.
355+
* Examples:
356+
* <pre>
357+
* produces = "text/plain"
358+
* produces = {"text/plain", "application/*"}
359+
* </pre>
350360
* Expressions can be negated by using the "!" operator, as in "!text/plain", which matches
351361
* all requests with a {@code Accept} other than "text/plain".
352362
* <p><b>Supported at the type level as well as at the method level!</b>

0 commit comments

Comments
 (0)