Browse Source

MappingJackson2JsonView does not refer to "renderedAttributes" anymore

Issue: SPR-17182
pull/1935/head
Juergen Hoeller 8 years ago
parent
commit
9de85f1336
  1. 4
      spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/MappingJackson2JsonView.java
  2. 2
      src/asciidoc/web-view.adoc

4
spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/MappingJackson2JsonView.java

@ -216,7 +216,7 @@ public class MappingJackson2JsonView extends AbstractJackson2View { @@ -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.
* <p>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 { @@ -263,7 +263,7 @@ public class MappingJackson2JsonView extends AbstractJackson2View {
}
if (jsonpFunction != null) {
generator.writeRaw("/**/");
generator.writeRaw(jsonpFunction + "(" );
generator.writeRaw(jsonpFunction + "(");
}
}

2
src/asciidoc/web-view.adoc

@ -2674,7 +2674,7 @@ The `MappingJackson2JsonView` uses the Jackson library's `ObjectMapper` to rende @@ -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.

Loading…
Cancel
Save