com.alibaba.fastjson.support.spring.FastJsonpResponseBodyAdvice Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fastjson-to-easyjson Show documentation
Show all versions of fastjson-to-easyjson Show documentation
Adapter alibaba fastjson to other json libraries. the fastjson version: 1.2.58
package com.alibaba.fastjson.support.spring;
import org.springframework.core.MethodParameter;
import org.springframework.core.annotation.Order;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;
import org.springframework.http.server.ServletServerHttpRequest;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
import javax.servlet.http.HttpServletRequest;
import java.util.regex.Pattern;
/**
* A convenient base class for {@code ResponseBodyAdvice} implementations
* that customize the response before JSON serialization with {@link FastJsonpHttpMessageConverter4}'s concrete
* subclasses.
*
* Compatible Spring MVC version 4.2+
*
* @author Jerry.Chen
* @see JSONPResponseBodyAdvice
* @since 1.2.20
*/
@Deprecated
@Order(Integer.MIN_VALUE) //before FastJsonViewResponseBodyAdvice
@ControllerAdvice
public class FastJsonpResponseBodyAdvice implements ResponseBodyAdvice