pagination: Spring Data JPA Page vs Slice vs keyset Window scrolling, with the SQL and REST shapes

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b4bLvQVbZweAqqf54x
This commit is contained in:
Claude
2026-11-16 11:13:56 +05:30
parent e3d1b550ae
commit 91938727f2
42 changed files with 1446 additions and 0 deletions
@@ -0,0 +1,5 @@
GET /products/raw?size=2 (return type Page<ProductView>)
{"content":[{"id":1,"name":"book-1","price":11.00},{"id":2,"name":"book-2","price":12.00}],"empty":false,"first":true,"last":false,"number":0,"numberOfElements":2,"pageable":{"offset":0,"pageNumber":0,"pageSize":2,"paged":true,"sort":{"empty":true,"sorted":false,"unsorted":true},"unpaged":false},"size":2,"sort":{"empty":true,"sorted":false,"unsorted":true},"totalElements":25,"totalPages":13}
GET /products/model?size=2 (return type PagedModel<ProductView>)
{"content":[{"id":1,"name":"book-1","price":11.00},{"id":2,"name":"book-2","price":12.00}],"page":{"size":2,"number":0,"totalElements":25,"totalPages":13}}