page使用
看一眼就会用 其余不管
SqlSession sqlSession = null;
Page<Student> page = null;
try {
sqlSession = MybatisDemo.getSqlSession();
PageHelper.startPage(Integer.parseInt(currentPage),Integer.parseInt(size));
StudentMapper mapper = sqlSession.getMapper(StudentMapper.class);
page = mapper.findByPage();
return page;
} catch (IOException e) {
e.printStackTrace();
}
return page;