Class RequestValidatorRequestBodyAdvice
java.lang.Object
org.springframework.web.servlet.mvc.method.annotation.RequestBodyAdviceAdapter
com.broadleafcommerce.cartoperation.web.advice.RequestValidatorRequestBodyAdvice
- All Implemented Interfaces:
- org.springframework.web.servlet.mvc.method.annotation.RequestBodyAdvice
@ControllerAdvice
public class RequestValidatorRequestBodyAdvice
extends org.springframework.web.servlet.mvc.method.annotation.RequestBodyAdviceAdapter
Applies request validator validation to request bodies marked with a Validated annotation.
- Author:
- Jacob Mitash
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionafterBodyRead(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.booleansupports(org.springframework.core.MethodParameter methodParameter, Type targetType, Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> converterType) Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.RequestBodyAdviceAdapterbeforeBodyRead, handleEmptyBody
- 
Constructor Details- 
RequestValidatorRequestBodyAdvice
 
- 
- 
Method Details- 
supports
- 
afterBodyRead@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) - Specified by:
- afterBodyReadin interface- org.springframework.web.servlet.mvc.method.annotation.RequestBodyAdvice
- Overrides:
- afterBodyReadin class- org.springframework.web.servlet.mvc.method.annotation.RequestBodyAdviceAdapter
 
- 
findCompatibleValidatorsFinds compatible request validators for a given type.- Parameters:
- clazz- the type to test support of
- Returns:
- the compatible validators
 
 
-