1.PageHelper技术
引用的包
import com.github.pagehelper.PageHelper;
案例
public void test() { // 设置分页(第一页,100条) PageHelper.startPage(1, 100); // select * from product where id > 12274 数据库中有5000条 List<Integer> productIdList = productManageMapper.getProductList(12274); // productIdList.size() = 100 System.out.println("productIdList.size() = " + productIdList.size()); }