一、使用limit分页:
语法:
1、select from user limit startIndex,pageSize;
2、select from user limit 3; 只有一个参数,代表从0开始的3条记录
使用mybatis完成分页:
1、接口
2、UserMapper.xml
3、测试
二、RowBounds分页
不再使用SQL实现分页
1、接口
2、UserMapper.xml
3、测试
三、分页插件
Mybatis分页插件PageHelper
Mybatis009-分页
猜你喜欢
转载自blog.51cto.com/12859164/2616100
周排行