类 JsonViewResponseBodyAdvice

java.lang.Object
cn.taketoday.web.handler.method.AbstractMappingJacksonResponseBodyAdvice
cn.taketoday.web.handler.method.JsonViewResponseBodyAdvice
所有已实现的接口:
ResponseBodyAdvice<Object>

public class JsonViewResponseBodyAdvice extends AbstractMappingJacksonResponseBodyAdvice
A ResponseBodyAdvice implementation that adds support for Jackson's @JsonView annotation declared on MVC @RequestMapping or @ExceptionHandler method.

The serialization view specified in the annotation will be passed in to the MappingJackson2HttpMessageConverter which will then use it to serialize the response body.

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

从以下版本开始:
4.0 2022/2/11 21:02
作者:
Rossen Stoyanchev, Harry Yang
另请参阅: