cn.gybyt.advice.ControllerResponseAdvice Maven / Gradle / Ivy
The newest version!
package cn.gybyt.advice;
import cn.gybyt.annotation.NotHandleResponse;
import cn.gybyt.util.BaseException;
import cn.gybyt.util.BaseResponse;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.core.MethodParameter;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
/**
* 返回拦截
*
* @program: utils
* @classname: ControllerResponseAdvice
* @author: codetiger
* @create: 2022/7/20 19:19
**/
@RestControllerAdvice
public class ControllerResponseAdvice implements ResponseBodyAdvice