@ControllerAdvice
public class RequestValidatorRequestBodyAdvice
extends org.springframework.web.servlet.mvc.method.annotation.RequestBodyAdviceAdapter
Constructor and Description |
---|
RequestValidatorRequestBodyAdvice(Set<RequestValidator> requestValidators) |
Modifier and Type | Method and Description |
---|---|
Object |
afterBodyRead(Object body,
org.springframework.http.HttpInputMessage inputMessage,
org.springframework.core.MethodParameter parameter,
Type targetType,
Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> converterType) |
protected Set<RequestValidator> |
findCompatibleValidators(Class<?> clazz)
Finds compatible request validators for a given type.
|
boolean |
supports(org.springframework.core.MethodParameter methodParameter,
Type targetType,
Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> converterType) |
public RequestValidatorRequestBodyAdvice(Set<RequestValidator> requestValidators)
public boolean supports(@NonNull org.springframework.core.MethodParameter methodParameter, @NonNull Type targetType, @NonNull Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> converterType)
@NonNull public Object afterBodyRead(@NonNull Object body, @NonNull org.springframework.http.HttpInputMessage inputMessage, @NonNull org.springframework.core.MethodParameter parameter, @NonNull Type targetType, @NonNull Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> converterType)
afterBodyRead
in interface org.springframework.web.servlet.mvc.method.annotation.RequestBodyAdvice
afterBodyRead
in class org.springframework.web.servlet.mvc.method.annotation.RequestBodyAdviceAdapter
protected Set<RequestValidator> findCompatibleValidators(Class<?> clazz)
clazz
- the type to test support ofCopyright © 2021. All rights reserved.