How to get all results in one page using Spring Data Pagination
The more correct way is to use Pageable.unpaged() Pageable wholePage = Pageable.unpaged(); return customerRepository.findAll(wholePage);
The more correct way is to use Pageable.unpaged() Pageable wholePage = Pageable.unpaged(); return customerRepository.findAll(wholePage);
You should take a look the reference documentation. It’s well explained. In your case, I think you cannot use between because you need to pass two parameters Between – findByStartDateBetween … where x.startDate between ?1 and ?2 In your case take a look to use a combination of LessThan or LessThanEqual with GreaterThan or GreaterThanEqual … Read more