open class RequestResponseBodyMethodProcessor : AbstractMessageConverterMethodProcessor
Resolves method arguments annotated with @RequestBody and handles return values from methods annotated with @ResponseBody by reading and writing to the body of the request or response with an HttpMessageConverter.
An @RequestBody method argument is also validated if it is annotated with @javax.validation.Valid. In case of validation failure, MethodArgumentNotValidException is raised and results in an HTTP 400 response status code if DefaultHandlerExceptionResolver is configured.
Author
Arjen Poutsma
Author
Rossen Stoyanchev
Author
Juergen Hoeller
Since
3.1
RequestResponseBodyMethodProcessor(converters: MutableList<HttpMessageConverter<*>>)
Basic constructor with converters only. Suitable for resolving RequestResponseBodyMethodProcessor(converters: MutableList<HttpMessageConverter<*>>, manager: ContentNegotiationManager)
Basic constructor with converters and RequestResponseBodyMethodProcessor(converters: MutableList<HttpMessageConverter<*>>, requestResponseBodyAdvice: MutableList<Any>)
Complete constructor for resolving RequestResponseBodyMethodProcessor(converters: MutableList<HttpMessageConverter<*>>, manager: ContentNegotiationManager, requestResponseBodyAdvice: MutableList<Any>)
Complete constructor for resolving |
open fun handleReturnValue(returnValue: Any, returnType: MethodParameter, mavContainer: ModelAndViewContainer, webRequest: NativeWebRequest): Unit |
|
open fun resolveArgument(parameter: MethodParameter, mavContainer: ModelAndViewContainer, webRequest: NativeWebRequest, binderFactory: WebDataBinderFactory): Any
Throws MethodArgumentNotValidException if validation fails. |
|
open fun supportsParameter(parameter: MethodParameter): Boolean |
|
open fun supportsReturnType(returnType: MethodParameter): Boolean |