public Page<Stability> testPager(){ Pageable pageable = new PageRequest(1, 10, Sort.Direction.ASC, "id"); return stabilityDao.findAll(pageable); }
so easy,page就是list外加了一层封装,直接转换成json返回更强大
https://juejin.im/