Return null when limit is greater than the remaining data when Hibernate is paged?

< H2 > description: < / H2 >

there are 19 pieces of data in total. When using PageRequest.of (page, limit) for paging query, as long as the limit parameter is greater than 19, it is found to be empty.
less than 19:00, function is normal.

< H2 > Test Code < / H2 >
 @Test
    public void t1() {
        //ok
        List<Employee> employees = employService.getEmployees(1,20);

        System.out.println(employees.size());
    }
< H2 > Service Code < / H2 >
public List<Employee> getEmployees(int page, int limit) {

        return employeeRepo.findAllByStatus(1, PageRequest.of(page, limit));
    }
< H2 > Dao Code < / H2 >

List < Employee > findAllByStatus (int status,Pageable pageable);

< H1 > has been solved, where to delete the problem? < / H1 >
Mar.01,2021
Menu