ARTICLE DETAIL

资讯详情

深耕网站建设、视觉设计与SEO优化的一线实战洞察。

MyBatis的分页插件

MyBatis的分页插件

分页插件使用步骤

1 添加依赖

<dependency><groupId>com.github.pagehelper</groupId><artifactId>pagehelper</artifactId><version>5.2.0</version></dependency>

2 配置分页插件

在MyBatis的核心配置文件中配置插件

<plugins><plugin interceptor="com.github.pagehelper.PageInterceptor"></plugin></plugins>

3 分页插件的使用

数据库中数据:

执行结果:

返回列表