在mybatis的xml中,添加以下代码,表示开启PageHelper插件
<plugins>
<plugin interceptor="com.github.pagehelper.PageInterceptor">
</plugin>
</plugins>
通过分页插件指定分页参数
PageHelper.offsetPage(page.getStart(),page.getCount());
具体有时间自己再百度,留个坑