Class MappingAwareDefaultedPageableArgumentResolver
java.lang.Object
org.springframework.data.rest.webmvc.json.MappingAwareDefaultedPageableArgumentResolver
- All Implemented Interfaces:
org.springframework.web.method.support.HandlerMethodArgumentResolver
public class MappingAwareDefaultedPageableArgumentResolver
extends Object
implements org.springframework.web.method.support.HandlerMethodArgumentResolver
HandlerMethodArgumentResolver
to resolve DefaultedPageable
from a
PageableHandlerMethodArgumentResolver
applying field to property mapping.
A resolved DefaultedPageable
is post-processed by applying Jackson field-to-property mapping if it contains a
Sort
instance. Customized fields are resolved to their property names. Unknown properties are removed from
Sort
.
- Since:
- 2.6
- Author:
- Mark Paluch, Oliver Gierke
-
Constructor Summary
ConstructorDescriptionMappingAwareDefaultedPageableArgumentResolver
(JacksonMappingAwareSortTranslator translator, org.springframework.data.web.PageableHandlerMethodArgumentResolver delegate) -
Method Summary
Modifier and TypeMethodDescriptionresolveArgument
(org.springframework.core.MethodParameter parameter, org.springframework.web.method.support.ModelAndViewContainer mavContainer, org.springframework.web.context.request.NativeWebRequest webRequest, org.springframework.web.bind.support.WebDataBinderFactory binderFactory) boolean
supportsParameter
(org.springframework.core.MethodParameter parameter)
-
Constructor Details
-
MappingAwareDefaultedPageableArgumentResolver
public MappingAwareDefaultedPageableArgumentResolver(JacksonMappingAwareSortTranslator translator, org.springframework.data.web.PageableHandlerMethodArgumentResolver delegate)
-
-
Method Details
-
supportsParameter
public boolean supportsParameter(org.springframework.core.MethodParameter parameter) - Specified by:
supportsParameter
in interfaceorg.springframework.web.method.support.HandlerMethodArgumentResolver
-
resolveArgument
public Object resolveArgument(org.springframework.core.MethodParameter parameter, org.springframework.web.method.support.ModelAndViewContainer mavContainer, org.springframework.web.context.request.NativeWebRequest webRequest, org.springframework.web.bind.support.WebDataBinderFactory binderFactory) throws Exception - Specified by:
resolveArgument
in interfaceorg.springframework.web.method.support.HandlerMethodArgumentResolver
- Throws:
Exception
-