mybatis分页PageHelper插件的使用

1.jar包,

2.改mybatis的配置文件,加上这段配置:

<plugins>
<plugin interceptor="com.github.pagehelper.PageInterceptor">
<!-- 使用下面的方式配置参数,后面会有所有的参数介绍 -->
<property name="param1" value="value1"/>
</plugin>
</plugins>

3.PageHelper.startpage(1,10);

3步到位。具体使用

https://github.com/pagehelper/Mybatis-PageHelper/blob/master/wikis/zh/HowToUse.md

原文地址:https://www.cnblogs.com/yunqing/p/8462099.html