I am currently Using Spring JPA and utilizing the Sorting and Pagination as described here -
How to query data via Spring data JPA by sort and pageable both out of box?<
Just create a query method in your repository interface for this.
Take a look in the docs, here.
Add a query method with paging and where clause.
Page findByLastname(String lastname, Pageable pageable);
So you can find User by a property "lastname" and configure Paging settings.