@Deprecated public class FastJsonpResponseBodyAdvice extends Object
ResponseBodyAdvice implementations
that customize the response before JSON serialization with FastJsonpHttpMessageConverter4's concrete
subclasses.
Compatible Spring MVC version 4.2+
JSONPResponseBodyAdvice| Modifier and Type | Field and Description |
|---|---|
static String[] |
DEFAULT_JSONP_QUERY_PARAM_NAMES
Deprecated.
Default JSONP query param names: callback/jsonp
|
| Constructor and Description |
|---|
FastJsonpResponseBodyAdvice()
Deprecated.
|
FastJsonpResponseBodyAdvice(String... queryParamNames)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
beforeBodyWrite(Object body,
MethodParameter returnType,
MediaType selectedContentType,
Class<? extends <any>> selectedConverterType,
ServerHttpRequest request,
ServerHttpResponse response)
Deprecated.
|
void |
beforeBodyWriteInternal(MappingFastJsonValue bodyContainer,
MediaType contentType,
MethodParameter returnType,
ServerHttpRequest request,
ServerHttpResponse response)
Deprecated.
Invoked only if the converter type is
FastJsonpHttpMessageConverter4. |
protected MediaType |
getContentType(MediaType contentType,
ServerHttpRequest request,
ServerHttpResponse response)
Deprecated.
Return the content type to set the response to.
|
protected MappingFastJsonValue |
getOrCreateContainer(Object body)
Deprecated.
Wrap the body in a
MappingFastJsonValue value container (for providing
additional serialization instructions) or simply cast it if already wrapped. |
protected boolean |
isValidJsonpQueryParam(String value)
Deprecated.
Validate the jsonp query parameter value.
|
boolean |
supports(MethodParameter returnType,
Class<? extends <any>> converterType)
Deprecated.
|
public static final String[] DEFAULT_JSONP_QUERY_PARAM_NAMES
public FastJsonpResponseBodyAdvice()
public FastJsonpResponseBodyAdvice(String... queryParamNames)
public boolean supports(MethodParameter returnType,
Class<? extends <any>> converterType)
public Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType selectedContentType, Class<? extends <any>> selectedConverterType, ServerHttpRequest request, ServerHttpResponse response)
protected MappingFastJsonValue getOrCreateContainer(Object body)
MappingFastJsonValue value container (for providing
additional serialization instructions) or simply cast it if already wrapped.public void beforeBodyWriteInternal(MappingFastJsonValue bodyContainer, MediaType contentType, MethodParameter returnType, ServerHttpRequest request, ServerHttpResponse response)
FastJsonpHttpMessageConverter4.protected boolean isValidJsonpQueryParam(String value)
value - the query param value, never nullprotected MediaType getContentType(MediaType contentType,
ServerHttpRequest request,
ServerHttpResponse response)
contentType - the content type selected through content negotiationrequest - the current requestresponse - the current responseCopyright © 2023. All rights reserved.