I want to to implement pagination in spring application.I know using repository we can implement pagination but we can not write our own query for data retrieve there are li
By extending Spring Data PagingAndSortingRepository interface you can get some common methods such as save, find, findAll and delete and also you can add your own custom queries:
public interface Repository extends PagingAndSortingRepository {
// Common method
Page findAll(Pageable pageable);
// Custom query based on Spring Data naming convention
Page findByNameOrDescription(String name, String description, Pageable pageable);
}