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 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 interface org.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 interface org.springframework.web.method.support.HandlerMethodArgumentResolver
      Throws:
      Exception