Complete the code to import the Pageable interface for pagination.
import org.springframework.data.domain.[1];
The Pageable interface is imported from org.springframework.data.domain to enable pagination.
Complete the method signature to accept pagination and sorting parameters using Pageable.
public Page<User> getUsers([1] pageable) {The method parameter should be of type Pageable to receive pagination and sorting info.
Fix the error in the repository method to support pagination.
Page<User> findAll([1] pageable);The repository method must accept a Pageable parameter to enable pagination.
Fill both blanks to create a PageRequest with page number 0 and size 10 sorted by 'name' ascending.
PageRequest [1] = PageRequest.[2](0, 10, Sort.by("name").ascending());
The variable is named pageRequest and the static factory method to create it is of.
Fill all three blanks to return a paged and sorted list of users by calling repository with pageable.
Page<User> users = userRepository.[1]([2]); return users.[3]();
The repository method to get paged data is findAll, passing the pageRequest variable, then calling getContent() to get the list of users.