Adding pagination, filters, and sorting capabilities
Now we have introduced the basis for a REST configuration of Spring MVC, we will improve our REST services by adding pagination, filtering, and sorting capabilities.
Pagination is a concept developed in the Spring Data project. To add pagination, we will introduce the
Pageable interface for wrapper implementations populated from the request. These are further on recognized and handled by Spring Data.
Page interface and specifically the
PageImpl instances can be produced by Spring Data to format its results. We will use them, as they are perfectly suited to REST rendering.
Finally, we will detail two data-binding tools used here to abstract filtering and pagination from our controllers' ...