spring-framework / org.springframework.web.servlet.mvc.method.annotation / RequestBodyAdvice / beforeBodyRead

beforeBodyRead

abstract fun beforeBodyRead(inputMessage: HttpInputMessage, parameter: MethodParameter, targetType: Type, converterType: Class<out HttpMessageConverter<*>>): HttpInputMessage

Invoked second before the request body is read and converted.

Parameters

inputMessage - the request

parameter - the target method parameter

targetType - the target type, not necessarily the same as the method parameter type, e.g. for HttpEntity<String>.

converterType - the converter used to deserialize the body

Return
the input request or a new instance, never null