标签:-- version sharp 情况 导入 ati get app conf
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>5.1.2</version>
</dependency>
mybatis-config.xml中添加如下配置: <!-- 配置分页插件 -->
<plugins>
<plugin interceptor="com.github.pagehelper.PageInterceptor">
</plugin>
</plugins>
分页插件版本不同,interceptor 可能会有区别,配置方式根据实际情况配置参数
Page page = PageHelper.startPage(pageNum,sizeNum,true); List<MainSearchVo> mainSearchVoList = companyMainPageMapper.getMainSearch(fname);
参数详解:
pageNum:当前页
sizeNum:每页显示条数
count :是否查询总条数 (true:查询 ,false:不查询)
获取总页数: page.getPages()
标签:-- version sharp 情况 导入 ati get app conf
原文地址:https://www.cnblogs.com/lin-mumu/p/10921983.html