How can I use Pageable in @RestController?
It should return not Pageable but Page.
public Page<YourEntityHere> readPageable(@NotNull final Pageable pageable) { return someService.search(pageable);}
Pageable is request side which contains what exactly you need. But Page contains results.
See for example the link