PageDTO pojo creation is missed in the steps. I had to refer the code from github to find it. To make the project complete, please add it in this page.
The code gives error on plantRepository.saveAll(plants). After research I found that PagingAndSortingRepository interface doesn't have save() or saveAll() methods. So, we need to extend CrudRepository as well. Please update the page with
public interface PlantRepository extends PagingAndSortingRepository<Plant, Long>, CrudRepository<Plant, Long> {}
Thanks for the details. I could run the project after making the changes. It is really helpful.
Build a Spring Boot REST API with Pagination and Sorting - Spring Cloud
Learn how to build a Spring Boot REST API with paging and sorting capabilities using spring data jpa.
https://www.springcloud.io/post/2022-04/spring-boot-rest/