DATACMNS-330, DATACMNS-331 - Advanced web integration.

Added PagedResourcesAssembler to easily convert Page instances into a PagedResource instance and automatically build the required previous/next links based on the PageableHandlerMethodArgumentResolver present in the MVC configuration. The assembler can either be injected into a Spring MVC controller or a controller method. The latter will then assume the controller methods URI to be used as pagination link base.

Added @EnableSpringDataWebSupport to automatically register HandlerMethodArgumentResolvers for Pageable and Sort as well as a DomainClassConverter that will allow the usage of domain types being managed by Spring Data repositories in controller method signatures. In case Spring HATEOAS is present on the classpath, we'll also register a PagedResourcesAssembler for injection as well as the appropriate HandlerMethodArgumentResolver for injection into controller methods.

Adapted Sonargraph configuration accordingly. Upgraded to Spring HATEOAS 0.6.0.BUILD-SNAPSHOT.
This commit is contained in:
Oliver Gierke
2013-05-08 14:07:13 +02:00
parent a741651672
commit a93c2bff94
15 changed files with 1179 additions and 295 deletions

View File

@@ -18,7 +18,7 @@
<properties>
<jackson>1.9.7</jackson>
<springhateoas>0.5.0.BUILD-SNAPSHOT</springhateoas>
<springhateoas>0.6.0.BUILD-SNAPSHOT</springhateoas>
<dist.key>DATACMNS</dist.key>
</properties>