Class ProxyingHandlerMethodArgumentResolver
java.lang.Object
org.springframework.web.method.annotation.ModelAttributeMethodProcessor
org.springframework.data.web.ProxyingHandlerMethodArgumentResolver
- All Implemented Interfaces:
Aware, BeanClassLoaderAware, BeanFactoryAware, HandlerMethodArgumentResolver, HandlerMethodReturnValueHandler
public class ProxyingHandlerMethodArgumentResolver
extends ModelAttributeMethodProcessor
implements BeanFactoryAware, BeanClassLoaderAware
HandlerMethodArgumentResolver to create Proxy instances for interface-based controller method parameters.
Resolution requires the method parameter or its interface type to be annotated with ProjectedPayload.
By default, data binding for collection properties is limited to 1024 elements. This limit can be overridden
by setting the "spring.data.web.projection.collection-limit" Spring property.
- Since:
- 1.10
- Author:
- Oliver Gierke, Chris Bono, Mark Paluch, Christoph Strobl
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of the Spring property to configure the collection size limit for data binding.Fields inherited from class ModelAttributeMethodProcessor
logger -
Constructor Summary
ConstructorsConstructorDescriptionProxyingHandlerMethodArgumentResolver(ObjectFactory<ConversionService> conversionService, boolean annotationNotRequired) Creates a newProxyingHandlerMethodArgumentResolverusing the givenConversionService. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbindRequestParameters(WebDataBinder binder, NativeWebRequest request) protected ObjectcreateAttribute(String attributeName, MethodParameter parameter, WebDataBinderFactory binderFactory, NativeWebRequest request) voidsetBeanClassLoader(ClassLoader classLoader) voidsetBeanFactory(BeanFactory beanFactory) booleansupportsParameter(MethodParameter parameter) Methods inherited from class ModelAttributeMethodProcessor
constructAttribute, handleReturnValue, isBindExceptionRequired, isBindExceptionRequired, resolveArgument, supportsReturnType, validateIfApplicable
-
Field Details
-
COLLECTION_SIZE_LIMIT_PARAM
Name of the Spring property to configure the collection size limit for data binding.- See Also:
-
-
Constructor Details
-
ProxyingHandlerMethodArgumentResolver
public ProxyingHandlerMethodArgumentResolver(ObjectFactory<ConversionService> conversionService, boolean annotationNotRequired) Creates a newProxyingHandlerMethodArgumentResolverusing the givenConversionService.- Parameters:
conversionService- must not be null.annotationNotRequired- whether interface-based method arguments are considered without requiring a@ModelAttributeannotation.
-
-
Method Details
-
setBeanFactory
- Specified by:
setBeanFactoryin interfaceBeanFactoryAware- Throws:
BeansException
-
setBeanClassLoader
- Specified by:
setBeanClassLoaderin interfaceBeanClassLoaderAware
-
supportsParameter
- Specified by:
supportsParameterin interfaceHandlerMethodArgumentResolver- Overrides:
supportsParameterin classModelAttributeMethodProcessor
-
createAttribute
protected Object createAttribute(String attributeName, MethodParameter parameter, WebDataBinderFactory binderFactory, NativeWebRequest request) throws Exception - Overrides:
createAttributein classModelAttributeMethodProcessor- Throws:
Exception
-
bindRequestParameters
- Overrides:
bindRequestParametersin classModelAttributeMethodProcessor
-