使用pagehelper實現分頁功能

1,分頁加入pagehelper依賴,並配置xml 2.從前臺獲取頁數 3.controller並判斷頁數大小(不能小於等於0) if (ObjectUtils.isEmpty(pageNum)||pageNum<0){ pageNum=1; } 然後輸入當前頁和每頁大小,其中pageInfo是系統配置類 PageHelper.startPage(pageNum,5); List admins =
相關文章
相關標籤/搜索