github上有一个专门针对mybatis的物理分页开源项目:mybatis-paginator,兼容目前绝大多数主流数据库,十分好用,下面是使用步骤:

环境:struts2 + spring + mybatis

一、pom.xml中添加依赖项

1   <dependency>
2    <groupId>com.github.miemiedev</groupId>
3    <artifactId>mybatis-paginator</artifactId>
4    <version>1.2.15</version>
5   </dependency>
View Code

相关文章: