Class KotlinRequestBodyAdvice
java.lang.Object
org.springframework.web.servlet.mvc.method.annotation.RequestBodyAdviceAdapter
org.springframework.web.servlet.mvc.method.annotation.KotlinRequestBodyAdvice
- All Implemented Interfaces:
- RequestBodyAdvice
A 
RequestBodyAdvice implementation that adds support for resolving
Kotlin KType from the parameter and providing it as a hint with a
"kotlin.reflect.KType" key.- Since:
- 7.0
- Author:
- Sebastien Deleuze
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiondetermineReadHints(MethodParameter parameter, Type targetType, Class<? extends SmartHttpMessageConverter<?>> converterType) Invoked to determine read hints if the converter is aSmartHttpMessageConverter.booleansupports(MethodParameter methodParameter, Type targetType, Class<? extends HttpMessageConverter<?>> converterType) Invoked first to determine if this interceptor applies.Methods inherited from class RequestBodyAdviceAdapterafterBodyRead, beforeBodyRead, handleEmptyBody
- 
Constructor Details- 
KotlinRequestBodyAdvicepublic KotlinRequestBodyAdvice()
 
- 
- 
Method Details- 
supportspublic boolean supports(MethodParameter methodParameter, Type targetType, Class<? extends HttpMessageConverter<?>> converterType) Description copied from interface:RequestBodyAdviceInvoked first to determine if this interceptor applies.- Parameters:
- methodParameter- the method parameter
- targetType- the target type, not necessarily the same as the method parameter type, for example, for- HttpEntity<String>.
- converterType- the selected converter type
- Returns:
- whether this interceptor should be invoked or not
 
- 
determineReadHintspublic @Nullable Map<String,Object> determineReadHints(MethodParameter parameter, Type targetType, Class<? extends SmartHttpMessageConverter<?>> converterType) Description copied from interface:RequestBodyAdviceInvoked to determine read hints if the converter is aSmartHttpMessageConverter.- Parameters:
- parameter- the target method parameter
- targetType- the target type, not necessarily the same as the method parameter type, for example, for- HttpEntity<String>.
- converterType- the selected converter type
- Returns:
- the hints determined otherwise null
 
 
-