Inside spring libraries there are two Pageable classes:
org.springframework.boot.autoconfigure.data.web.SpringDataWebProperties.Pageableorg.springframework.data.domain.Pageable
Which one should I use into my controllers and into my repositories?
Inside spring libraries there are two Pageable classes:
org.springframework.boot.autoconfigure.data.web.SpringDataWebProperties.Pageableorg.springframework.data.domain.PageableWhich one should I use into my controllers and into my repositories?
spring-data-commons' domain.Pageable class is for the Page's info: like offset, size, sort; which is the input to the Repositories;
spring-boot-autoConfigure's SpringDataWebProperties.Pageable is a static inner class with some defaults for the above, which you can override, for example
spring.data.web.pageable.default-page-size=50 # default is 20 spring.data.web.pageable.max-page-size=200 # 2000