DATACMNS-1479 - Fix usage of PageRequest in reference documentation.

Previously, the docs still showed the usage of the constructor of PageRequest, which has now been changed to an ….of(…) factory method.
This commit is contained in:
Juhyoung Jeon
2019-02-12 22:55:12 +09:00
committed by Oliver Drotbohm
parent cb37bdd994
commit 42c80aeee6

View File

@@ -69,7 +69,7 @@ To access the second page of `User` by a page size of 20, you could do something
[source, java]
----
PagingAndSortingRepository<User, Long> repository = // … get access to a bean
Page<User> users = repository.findAll(new PageRequest(1, 20));
Page<User> 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