How to use pagination in spring mvc and hibernate application

11,594

Since you are using Spring Data JPA, check out the extremely helpful PagingAndSortingRepository interface. This tutorial will show you all you need to see how it used

Share:
11,594
Vijay Leo
Author by

Vijay Leo

Updated on June 04, 2022

Comments

  • Vijay Leo
    Vijay Leo almost 2 years

    I have developed spring MVC + MySQL and hibernate application

    It handles the more than thousands of records. Here, I am using dataTable for displaying records. It working fine. But, my problem is performance issue for record loading..

    When i execute the query in db server, it takes fraction of seconds to loading a thousands of records. but while i using a query via my app it takes more than 5 sec.

    I think the dataTable pagination takes too much time to loading the records.. How can i resolve this type of issues. I have realize the solution is only for server side pagination.

    I don't know how to make a these type of pagination like "Prev 1 2 3 4 5 Next" with searching and sorting controls in server side.

    So, please advice me how can i display the records from above requirements in my app. small piece code may more helpful for my knowledge growth.