Class MappingAwarePageableArgumentResolver

java.lang.Object
org.springframework.data.rest.webmvc.json.MappingAwarePageableArgumentResolver
All Implemented Interfaces:
org.springframework.data.web.PageableArgumentResolver, org.springframework.web.method.support.HandlerMethodArgumentResolver

public class MappingAwarePageableArgumentResolver extends Object implements org.springframework.web.method.support.HandlerMethodArgumentResolver, org.springframework.data.web.PageableArgumentResolver
HandlerMethodArgumentResolver to resolve Pageable from a PageableArgumentResolver applying field to property mapping.

A resolved Pageable 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

    • MappingAwarePageableArgumentResolver

      public MappingAwarePageableArgumentResolver(JacksonMappingAwareSortTranslator translator, org.springframework.data.web.PageableArgumentResolver 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 org.springframework.data.domain.Pageable resolveArgument(org.springframework.core.MethodParameter methodParameter, org.springframework.web.method.support.ModelAndViewContainer mavContainer, org.springframework.web.context.request.NativeWebRequest webRequest, org.springframework.web.bind.support.WebDataBinderFactory binderFactory)
      Specified by:
      resolveArgument in interface org.springframework.web.method.support.HandlerMethodArgumentResolver
      Specified by:
      resolveArgument in interface org.springframework.data.web.PageableArgumentResolver