Spring Data Core

org.springframework.data.web.config
Class HateoasAwareSpringDataWebConfiguration

java.lang.Object
  extended by org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
      extended by org.springframework.data.web.config.SpringDataWebConfiguration
          extended by org.springframework.data.web.config.HateoasAwareSpringDataWebConfiguration
All Implemented Interfaces:
WebMvcConfigurer

@Configuration
public class HateoasAwareSpringDataWebConfiguration
extends SpringDataWebConfiguration

JavaConfig class to register PagedResourcesAssembler and PagedResourcesAssemblerArgumentResolver.

Since:
1.6
Author:
Oliver Gierke, Nick Williams

Constructor Summary
HateoasAwareSpringDataWebConfiguration()
           
 
Method Summary
 void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers)
           
 HateoasPageableHandlerMethodArgumentResolver pageableResolver()
           
 PagedResourcesAssembler<Object> pagedResourcesAssembler()
           
 PagedResourcesAssemblerArgumentResolver pagedResourcesAssemblerArgumentResolver()
           
 HateoasSortHandlerMethodArgumentResolver sortResolver()
           
 
Methods inherited from class org.springframework.data.web.config.SpringDataWebConfiguration
addFormatters
 
Methods inherited from class org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
addInterceptors, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, getValidator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HateoasAwareSpringDataWebConfiguration

public HateoasAwareSpringDataWebConfiguration()
Method Detail

pageableResolver

@Bean
public HateoasPageableHandlerMethodArgumentResolver pageableResolver()
Overrides:
pageableResolver in class SpringDataWebConfiguration

sortResolver

@Bean
public HateoasSortHandlerMethodArgumentResolver sortResolver()
Overrides:
sortResolver in class SpringDataWebConfiguration

pagedResourcesAssembler

@Bean
public PagedResourcesAssembler<Object> pagedResourcesAssembler()

pagedResourcesAssemblerArgumentResolver

@Bean
public PagedResourcesAssemblerArgumentResolver pagedResourcesAssemblerArgumentResolver()

addArgumentResolvers

public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers)
Specified by:
addArgumentResolvers in interface WebMvcConfigurer
Overrides:
addArgumentResolvers in class SpringDataWebConfiguration

Spring Data Core

Copyright © 2011-2013-2013 Pivotal. All Rights Reserved.