From 42c80aeee62feddedc2f6c3ed925d0e4d9419afb Mon Sep 17 00:00:00 2001 From: Juhyoung Jeon Date: Tue, 12 Feb 2019 22:55:12 +0900 Subject: [PATCH] DATACMNS-1479 - Fix usage of PageRequest in reference documentation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, the docs still showed the usage of the constructor of PageRequest, which has now been changed to an ….of(…) factory method. --- src/main/asciidoc/repositories.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/asciidoc/repositories.adoc b/src/main/asciidoc/repositories.adoc index 2ca5cb790..50b2bbc71 100644 --- a/src/main/asciidoc/repositories.adoc +++ b/src/main/asciidoc/repositories.adoc @@ -69,7 +69,7 @@ To access the second page of `User` by a page size of 20, you could do something [source, java] ---- PagingAndSortingRepository repository = // … get access to a bean -Page users = repository.findAll(new PageRequest(1, 20)); +Page users = repository.findAll(PageRequest.of(1, 20)); ---- In addition to query methods, query derivation for both count and delete queries is available. The following list shows the interface definition for a derived count query: @@ -1234,7 +1234,7 @@ String showUsers(Model model, you have to populate `thing1_page` and `thing2_page` and so on. -The default `Pageable` passed into the method is equivalent to a `new PageRequest(0, 20)` but can be customized by using the `@PageableDefault` annotation on the `Pageable` parameter. +The default `Pageable` passed into the method is equivalent to a `PageRequest.of(0, 20)` but can be customized by using the `@PageableDefault` annotation on the `Pageable` parameter. [[core.web.pageables]] ==== Hypermedia Support for Pageables