Add @RequestMapping produces documentation about charset

Issue: SPR-13600
This commit is contained in:
Sebastien Deleuze
2015-11-02 07:48:02 +01:00
parent 4aedd92c3c
commit 62cd6ad526
2 changed files with 14 additions and 3 deletions

View File

@@ -414,8 +414,11 @@ public @interface RequestMapping {
* <pre class="code">
* produces = "text/plain"
* produces = {"text/plain", "application/*"}
* produces = "application/json; charset=UTF-8"
* </pre>
* Expressions can be negated by using the "!" operator, as in "!text/plain", which matches
* <p>It affects the actual content type written, for example to produce a JSON response
* with UTF-8 encoding, {@code "application/json; charset=UTF-8"} should be used.
* <p>Expressions can be negated by using the "!" operator, as in "!text/plain", which matches
* all requests with a {@code Accept} other than "text/plain".
* <p><b>Supported at the type level as well as at the method level!</b>
* When used at the type level, all method-level mappings override