We will create a Spring Boot REST API that communicates with an in-memory H2 database. In this post, I will explain how to perform pagination in Spring Boot. If you are new to creating a simple Spring Boot application that uses CrudRepository of Spring Data JPA, you can refer to one of my previous post on Spring Boot Web Application – Part 3 – Spring Data JPA to retrieve the records using the pagination and sorting techniques). The, PaginationAndSortingRepository interface which extends the CrudRepository interface of Spring Data JPA provides this functionality (i.e. Instead, you would want to display chunks of data of suitable sizes with high readability. In this scenario, you probably won’t want to display all records on a single page. You need to display the query results to users. Consider a scenario where a database query matches over 1000 records.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |