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