-
Notifications
You must be signed in to change notification settings - Fork 683
Support to render SlicedModel
from Slice
via a dedicated RepresentationModelAssembler
#1307
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Hi Oliver, |
Same issue here: we are exposing a MongoDB collection with 1M+ elements via Spring HATEOAS and Page has become utterly inefficient due to the -useless in this case- total page number called through a count(). |
As a workaround it should be possible to issue repository methods returning a |
You're right, will look into it 👍 |
This is groundwork needed to support SlicedResourcesAssembler<T> in spring-data-commons. See spring-projects/spring-data-commons#1307
Added SlicedResourcesAssembler to esaily convert Slice instances into SlicedResource instances and automatically build the required previous/next link based on 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 necessary SlicedResourcesAssemblerArgumentResolver and MethodParameterAwareSlicedResourcesAssembler classes and wire up HateoasAwareSpringDataWebConfiguration configuration beans to that SlicedResourcesAssembler's can be auto-injected into controllers. Closes spring-projects#1307
Added SlicedResourcesAssembler to esaily convert Slice instances into SlicedResource instances and automatically build the required previous/next link based on 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 necessary SlicedResourcesAssemblerArgumentResolver and MethodParameterAwareSlicedResourcesAssembler classes and wire up HateoasAwareSpringDataWebConfiguration configuration beans to that SlicedResourcesAssembler's can be auto-injected into controllers. Closes spring-projects#1307
This bothered me enough I took a stab at solving it. Added |
This is groundwork needed to support SlicedResourcesAssembler<T> in spring-data-commons. See spring-projects/spring-data-commons#1307
This is groundwork needed to support SlicedResourcesAssembler<T> in spring-data-commons. See spring-projects/spring-data-commons#1307
In parallel to PagedModel we now provide a SlicedModel. This is groundwork needed to support SlicedResourcesAssembler<T> in spring-data-commons. Related ticket: spring-projects/spring-data-commons#1307
Imports, Javadoc, ticket references in test cases. Removed the need for MethodParameterAware… flavors of the ResourceAssemblers by keeping the MethodParameter reference in the original assemblers in the first place. Extracted common Pageable MethodParameter lookup code into PageableMethodParameterUtils. Related ticket: #1307.
Update to latest addition in support for Slice. Also update to renamed methods and types in Spring HATEOAS. Related ticket: #1307
SlicedModel
from Slice
via a dedicated RepresentationModelAssembler
Oliver Drotbohm opened DATACMNS-845 and commented
From the original ticket in Spring HATEOAS:
Reference URL: spring-projects/spring-hateoas#443
2 votes, 4 watchers
The text was updated successfully, but these errors were encountered: