首页 > 代码库 > 分页查询

分页查询

 

使用 RowBounds 对结果集进行分页 

  1. <select id="findAllStudents" resultMap="StudentResult">
  2.     select * from Students
  3. </select>
  4. int offset =0 , limit =25;
  5. RowBounds rowBounds = new RowBounds(offset, limit);
  6. List<Student> = studentMapper.getStudents(rowBounds);

分页查询