类 ControllerResponseAdvice

java.lang.Object
cn.gybyt.web.advice.ControllerResponseAdvice
所有已实现的接口:
org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>

@RestControllerAdvice @ConditionalOnProperty(prefix="gybyt", name="warpper", havingValue="true") public class ControllerResponseAdvice extends Object implements org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>
返回拦截
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    beforeBodyWrite(Object body, org.springframework.core.MethodParameter returnType, org.springframework.http.MediaType selectedContentType, Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> selectedConverterType, org.springframework.http.server.ServerHttpRequest request, org.springframework.http.server.ServerHttpResponse response)
    对返回体进行处理
    boolean
    supports(org.springframework.core.MethodParameter returnType, Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> converterType)
    判断是否需要对返回进行处理

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • ControllerResponseAdvice

      public ControllerResponseAdvice()
  • 方法详细资料

    • supports

      public boolean supports(org.springframework.core.MethodParameter returnType, Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> converterType)
      判断是否需要对返回进行处理
      指定者:
      supports 在接口中 org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>
      参数:
      returnType -
      converterType -
      返回:
    • beforeBodyWrite

      public Object beforeBodyWrite(Object body, org.springframework.core.MethodParameter returnType, org.springframework.http.MediaType selectedContentType, Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> selectedConverterType, org.springframework.http.server.ServerHttpRequest request, org.springframework.http.server.ServerHttpResponse response)
      对返回体进行处理
      指定者:
      beforeBodyWrite 在接口中 org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>
      参数:
      body -
      returnType -
      selectedContentType -
      selectedConverterType -
      request -
      response -
      返回: