Example usage for org.springframework.data.rest.webmvc.config ArgumentResolverPagingAndSortingTemplateVariables ArgumentResolverPagingAndSortingTemplateVariables

List of usage examples for org.springframework.data.rest.webmvc.config ArgumentResolverPagingAndSortingTemplateVariables ArgumentResolverPagingAndSortingTemplateVariables

Introduction

In this page you can find the example usage for org.springframework.data.rest.webmvc.config ArgumentResolverPagingAndSortingTemplateVariables ArgumentResolverPagingAndSortingTemplateVariables.

Prototype

public ArgumentResolverPagingAndSortingTemplateVariables(
        HateoasPageableHandlerMethodArgumentResolver pagingResolver,
        HateoasSortHandlerMethodArgumentResolver sortResolver) 

Source Link

Document

Creates a new ArgumentResolverPagingAndSortingTemplateVariables using the given HateoasPageableHandlerMethodArgumentResolver and HateoasSortHandlerMethodArgumentResolver .

Usage

From source file:org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.java

/**
 * A special {@link org.springframework.hateoas.EntityLinks} implementation that takes repository and current
 * configuration into account when generating links.
 * /*from  w w w . ja v a2 s . c  om*/
 * @return
 * @throws Exception
 */
@Bean
public RepositoryEntityLinks entityLinks() {

    PagingAndSortingTemplateVariables templateVariables = new ArgumentResolverPagingAndSortingTemplateVariables(
            pageableResolver(), sortResolver());

    return new RepositoryEntityLinks(repositories(), resourceMappings(), config(), templateVariables,
            backendIdConverterRegistry());
}