I am trying to implement pagination and sorting in spring MVC. As per my understanding, we can use PagingAndSortingRepository or JpaRepository for same(http://springinpractice.com/2012/05/11/pagination-and-sorting-with-spring-data-jpa).
But both these use the default findAll method to do so.
I wish to create my own method and execute a custom query and perform the pagination as well as sorting on that(lets say search by category name and sort by creation date). I am not sure how to do this by using PagingAndSortingRepository or JpaRepository.
It will be great if I can have some sort of guidance to achieve this.
Thanks in advance.