Deprecate JSONP and disable it by default in Jackson view

Issue: SPR-16798
This commit is contained in:
Sebastien Deleuze
2018-06-08 12:31:40 +02:00
parent 7bfd683816
commit b80c13b722
11 changed files with 62 additions and 15 deletions

View File

@@ -2030,9 +2030,10 @@ annotations. When further control is needed, a custom `ObjectMapper` can be inje
through the `ObjectMapper` property for cases where custom JSON
serializers/deserializers need to be provided for specific types.
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
name(s) could be customized through the `jsonpParameterNames` property.
As of Spring Framework 5.0.7, http://en.wikipedia.org/wiki/JSONP[JSONP] support is
deprecated and requires to customize the JSONP query parameter
name(s) through the `jsonpParameterNames` property. This support will be removed as of
Spring Framework 5.1, <<mvc-cors,CORS>> should be used instead.

View File

@@ -2670,6 +2670,11 @@ For controllers relying on view resolution, JSONP is automatically enabled when
request has a query parameter named `jsonp` or `callback`. Those names can be
customized through `jsonpParameterNames` property.
[NOTE]
====
As of Spring Framework 5.0.7, JSONP support is deprecated and will be removed as of
Spring Framework 5.1, <<mvc-cors,CORS>> should be used instead.
====
[[mvc-ann-modelattrib-methods]]