数据库分页操作
分页是生活中最常见的操作,大大小小的网页都会进行页面数据的分页,因为数据很多,无法完整地显示在一个页面,所以分页操作至关重要,本篇文章简单地介绍如何进行分页操作
1、导jar包
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>5.1.2<ersion>
</dependency>
将此jar包添加到pom.xml文件中
2、添加pagehelper
告诉mybatis要用pagehelper 添加到sqlsessionfactroybean,在applicationContext.xml文件中
<property name="plugins">
<array>
<bean class="com.github.pagehelper.PageInterceptor">
<property name="properties">
<