<configuration> <plugins> <plugin interceptor="com.github.pagehelper.PageHelper"> <property value="mysql" /> <property value="true" /> <property value="true" /> <property value="true" /> <property value="true" /> </plugin> </plugins> </configuration>
2.service
public PageInfo page(pageNum, pageSize){ PageHelper.startPage(pageNum, pageSize); List<ShopNav> lists = navService.getAllNav(); PageInfo<ShopNav> pageInfo = new PageInfo<ShopNav>(lists); return PageInfo; }
页面效果展示
如果大家还想深入学习,可以点击这里进行学习,再为大家附3个精彩的专题: