티스토리 뷰

데이터를 페이징, 정렬 처리 하기위해 Pageable과 Sort 기능을 사용한다다.


https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/domain/Pageable.html

https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/domain/PageRequest.html

https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/domain/Sort.html


해당 repository


service단에서 method구현내용


구글링 하다보니 대부분 Pageable pageable = new Pageable(page, size) 으로 나와있는데

Pageable의 constructors는 deprecated 되어 PageRequest.of(page, size)로 사용해야 한다

Deprecated. use of(int, int) instead.

댓글
최근에 올라온 글
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28