



@Test
void findAll() throws Exception {
// PageRequest request = new PageRequest(0, 2);
Pageable pageable = PageRequest.of
(0, 2, Sort.Direction.DESC, "ProductId");
Page<ProductInfo> all = productService.findAll(pageable);
System.out.println(all);
}
本文介绍了一种使用Java Spring Boot框架进行产品信息分页查询的方法。通过Pageable接口设置每页显示数量及排序规则,实现了高效的数据分页展示。
3024

被折叠的 条评论
为什么被折叠?



