mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 07:15:49 +00:00
updated
This commit is contained in:
parent
920fd7cd9e
commit
f4191cbbf7
1 changed files with 7 additions and 3 deletions
|
@ -124,9 +124,6 @@ class OwnerController {
|
|||
owner.setLastName(""); // empty string signifies broadest possible search
|
||||
}
|
||||
|
||||
for (int i = 0; i < 100; i++) {
|
||||
Page<Owner> ownersResults = findPaginatedForOwnersLastName(page, owner.getLastName());
|
||||
}
|
||||
|
||||
// find owners by last name
|
||||
Page<Owner> ownersResults = findPaginatedForOwnersLastName(page, owner.getLastName());
|
||||
|
@ -168,6 +165,13 @@ class OwnerController {
|
|||
return owners.findByLastName(lastname, pageable);
|
||||
}
|
||||
|
||||
@WithSpan
|
||||
private Page<Owner> findPaginatedForOwnersLastNameThree(int page, String lastname) {
|
||||
int pageSize = 25;
|
||||
Pageable pageable = PageRequest.of(page - 1, pageSize);
|
||||
return owners.findByLastName(lastname, pageable);
|
||||
}
|
||||
|
||||
private Page<Owner> findPaginatedForOwnersLastNameTwo(int page, String lastname) {
|
||||
int pageSize = 25;
|
||||
Pageable pageable = PageRequest.of(page - 1, pageSize);
|
||||
|
|
Loading…
Reference in a new issue