public class HttpEntityMethodProcessor extends AbstractMessageConverterMethodProcessor
HttpEntity
and RequestEntity
method argument values
and also handles HttpEntity
and ResponseEntity
return values.
An HttpEntity
return type has a specific purpose. Therefore this
handler should be configured ahead of handlers that support any return
value type annotated with @ModelAttribute
or @ResponseBody
to ensure they don't take over.
allSupportedMediaTypes, logger, messageConverters
Constructor and Description |
---|
HttpEntityMethodProcessor(List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters) |
HttpEntityMethodProcessor(List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters,
org.springframework.web.accept.ContentNegotiationManager contentNegotiationManager) |
HttpEntityMethodProcessor(List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters,
org.springframework.web.accept.ContentNegotiationManager contentNegotiationManager,
List<Object> responseBodyAdvice) |
Modifier and Type | Method and Description |
---|---|
protected Class<?> |
getReturnValueType(Object returnValue,
org.springframework.core.MethodParameter returnType)
Return the type of the value to be written to the response.
|
void |
handleReturnValue(Object returnValue,
org.springframework.core.MethodParameter returnType,
org.springframework.web.method.support.ModelAndViewContainer mavContainer,
org.springframework.web.context.request.NativeWebRequest webRequest) |
Object |
resolveArgument(org.springframework.core.MethodParameter parameter,
org.springframework.web.method.support.ModelAndViewContainer mavContainer,
org.springframework.web.context.request.NativeWebRequest webRequest,
org.springframework.web.bind.support.WebDataBinderFactory binderFactory) |
boolean |
supportsParameter(org.springframework.core.MethodParameter parameter) |
boolean |
supportsReturnType(org.springframework.core.MethodParameter returnType) |
createOutputMessage, getAdviceChain, getProducibleMediaTypes, writeWithMessageConverters, writeWithMessageConverters
createInputMessage, isBindExceptionRequired, readWithMessageConverters, readWithMessageConverters, validateIfApplicable
public HttpEntityMethodProcessor(List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters)
public HttpEntityMethodProcessor(List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters, org.springframework.web.accept.ContentNegotiationManager contentNegotiationManager)
public boolean supportsParameter(org.springframework.core.MethodParameter parameter)
public boolean supportsReturnType(org.springframework.core.MethodParameter returnType)
public Object resolveArgument(org.springframework.core.MethodParameter parameter, org.springframework.web.method.support.ModelAndViewContainer mavContainer, org.springframework.web.context.request.NativeWebRequest webRequest, org.springframework.web.bind.support.WebDataBinderFactory binderFactory) throws IOException, org.springframework.web.HttpMediaTypeNotSupportedException
IOException
org.springframework.web.HttpMediaTypeNotSupportedException
public void handleReturnValue(Object returnValue, org.springframework.core.MethodParameter returnType, org.springframework.web.method.support.ModelAndViewContainer mavContainer, org.springframework.web.context.request.NativeWebRequest webRequest) throws Exception
Exception
protected Class<?> getReturnValueType(Object returnValue, org.springframework.core.MethodParameter returnType)
AbstractMessageConverterMethodProcessor
ResponseEntity<T>
).getReturnValueType
in class AbstractMessageConverterMethodProcessor