com.alibaba.fastjson.support.spring
Class FastJsonViewResponseBodyAdvice
- java.lang.Object
-
- com.alibaba.fastjson.support.spring.FastJsonViewResponseBodyAdvice
-
- All Implemented Interfaces:
- org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice< Object>
@Order @ControllerAdvice public class FastJsonViewResponseBodyAdvice extends Object implements org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>
A convenient base class forResponseBodyAdvice
implementations that customize the response before JSON serialization withFastJsonHttpMessageConverter4
's concrete subclasses.- Author:
- yanquanyu, liuming
-
Constructor Summary
Constructors Constructor and Description FastJsonViewResponseBodyAdvice()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description FastJsonContainer
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)
-
Method Detail
supports
public boolean supports(org.springframework.core.MethodParameter returnType, Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> converterType)
- Specified by:
-
supports
in interfaceorg.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>
beforeBodyWrite
public FastJsonContainer 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)
- Specified by:
-
beforeBodyWrite
in interfaceorg.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>
Copyright © 2012–2021 Alibaba Group. All rights reserved.