类 JsonViewRequestBodyAdvice

  • 所有已实现的接口:
    RequestBodyAdvice

    public class JsonViewRequestBodyAdvice
    extends RequestBodyAdviceAdapter
    A RequestBodyAdvice implementation that adds support for Jackson's @JsonView annotation declared on a Spring MVC @HttpEntity or @RequestBody method parameter.

    The deserialization view specified in the annotation will be passed in to the MappingJackson2HttpMessageConverter which will then use it to deserialize the request body with.

    Note that despite @JsonView allowing for more than one class to be specified, the use for a request body advice is only supported with exactly one class argument. Consider the use of a composite interface.

    Jackson 2.5 or later is required for parameter-level use of @JsonView.

    从以下版本开始:
    4.2
    作者:
    Sebastien Deleuze
    另请参阅:
    JsonView, ObjectMapper.readerWithView(Class)