From 9de85f1336e6a3d4156eabbb14d04d9e725ca72a Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 14 Aug 2018 22:02:31 +0200 Subject: [PATCH] MappingJackson2JsonView does not refer to "renderedAttributes" anymore Issue: SPR-17182 --- .../web/servlet/view/json/MappingJackson2JsonView.java | 4 ++-- src/asciidoc/web-view.adoc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/MappingJackson2JsonView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/MappingJackson2JsonView.java index c8853596e07..939d87f379e 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/MappingJackson2JsonView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/MappingJackson2JsonView.java @@ -216,7 +216,7 @@ public class MappingJackson2JsonView extends AbstractJackson2View { * Filter out undesired attributes from the given model. * The return value can be either another {@link Map} or a single value object. *

The default implementation removes {@link BindingResult} instances and entries - * not included in the {@link #setModelKeys renderedAttributes} property. + * not included in the {@link #setModelKeys modelKeys} property. * @param model the model, as passed on to {@link #renderMergedOutputModel} * @return the value to be rendered */ @@ -263,7 +263,7 @@ public class MappingJackson2JsonView extends AbstractJackson2View { } if (jsonpFunction != null) { generator.writeRaw("/**/"); - generator.writeRaw(jsonpFunction + "(" ); + generator.writeRaw(jsonpFunction + "("); } } diff --git a/src/asciidoc/web-view.adoc b/src/asciidoc/web-view.adoc index 56d46919c5a..f35cfb17a67 100644 --- a/src/asciidoc/web-view.adoc +++ b/src/asciidoc/web-view.adoc @@ -2674,7 +2674,7 @@ The `MappingJackson2JsonView` uses the Jackson library's `ObjectMapper` to rende content as JSON. By default, the entire contents of the model map (with the exception of framework-specific classes) will be encoded as JSON. For cases where the contents of the map need to be filtered, users may specify a specific set of model attributes to encode -via the `RenderedAttributes` property. The `extractValueFromSingleKeyModel` property may +via the `modelKeys` property. The `extractValueFromSingleKeyModel` property may also be used to have the value in single-key models extracted and serialized directly rather than as a map of model attributes.