接口 ResponseBodyAdvice<T>

  • 类型参数:
    T - the body type
    所有已知实现类:
    AbstractMappingJacksonResponseBodyAdvice, JsonViewResponseBodyAdvice

    public interface ResponseBodyAdvice<T>
    Allows customizing the response after the execution of an @ResponseBody or a ResponseEntity controller method but before the body is written with an HttpMessageConverter.

    Implementations may be registered directly with RequestMappingHandlerAdapter and ExceptionHandlerExceptionResolver or more likely annotated with @ControllerAdvice in which case they will be auto-detected by both.

    从以下版本开始:
    4.1
    作者:
    Rossen Stoyanchev