Update reference

This commit is contained in:
Rossen Stoyanchev 2014-09-03 13:08:59 -04:00
parent 801658d362
commit 50846e3288
1 changed files with 10 additions and 5 deletions

View File

@ -1063,8 +1063,7 @@ method has been added.
summary vs. detail page). This is also supported with View-based rendering by summary vs. detail page). This is also supported with View-based rendering by
adding the serialization view type as a model attribute under a special key. adding the serialization view type as a model attribute under a special key.
See <<mvc-ann-jsonview>> for details. See <<mvc-ann-jsonview>> for details.
* JSONP is now supported with Jackson, both for <<mvc-ann-jsonp,response body methods>> and * JSONP is now supported with Jackson. See <<mvc-ann-jsonp>>.
<<view-json-mapping,`View`-based rendering>>.
* A new lifecycle option is available for intercepting `@ResponseBody` and `ResponseEntity` * A new lifecycle option is available for intercepting `@ResponseBody` and `ResponseEntity`
methods just after the controller method returns and before the response is written. methods just after the controller method returns and before the response is written.
To take advantage declare an `@ControllerAdvice` bean that implements `ResponseBodyAdvice`. To take advantage declare an `@ControllerAdvice` bean that implements `ResponseBodyAdvice`.
@ -31716,8 +31715,10 @@ to the model:
[[mvc-ann-jsonp]] [[mvc-ann-jsonp]]
===== Jackson JSONP Support ===== Jackson JSONP Support
In order to enable http://en.wikipedia.org/wiki/JSONP[JSONP] support for your response In order to enable http://en.wikipedia.org/wiki/JSONP[JSONP] support for `@ResponseBody`
body methods, declare an `@ControllerAdvice` as shown below: and `ResponseEntity` methods, declare an `@ControllerAdvice` bean that extends
`AbstractJsonpResponseBodyAdvice` as shown below where the constructor argument indicates
the JSONP query parameter name(s):
[source,java,indent=0] [source,java,indent=0]
[subs="verbatim,quotes"] [subs="verbatim,quotes"]
@ -31731,6 +31732,10 @@ body methods, declare an `@ControllerAdvice` as shown below:
} }
---- ----
For controllers relying on view resolution, JSONP is automatically enabled when the
request has a query parameter named `jsonp` or `callback`. Those names can be
customized through `jsonpParameterNames` property.
[[mvc-ann-async]] [[mvc-ann-async]]
==== Asynchronous Request Processing ==== Asynchronous Request Processing
@ -37025,7 +37030,7 @@ serializers/deserializers need to be provided for specific types.
http://en.wikipedia.org/wiki/JSONP[JSONP] is supported and automatically enabled when http://en.wikipedia.org/wiki/JSONP[JSONP] is supported and automatically enabled when
the request has a query parameter named `jsonp` or `callback`. The JSONP query parameter the request has a query parameter named `jsonp` or `callback`. The JSONP query parameter
name(s) could be customized thanks to the `JsonpParameterNames` property. name(s) could be customized through the `jsonpParameterNames` property.