’PageRequest(int, int, org.springframework.data.domain.Sort)’ has protected access in 'org.springframework.data.domain.PageRequest’
代码改为:
//分页
Page<User> pageUser = userDao.findAll(spec, PageRequest.of(page-1,size));
PageRequest源码查看: