MyBatis 三剑客

1.mybatis-generator

使用教程
http://blog.csdn.net/u011410529/article/details/50484274

2.mybatis-plugin

idea 安装教程
http://www.cnblogs.com/XJJD/p/8193168.html

3.mybatis-pagehelper

使用教程地址
https://github.com/pagehelper/Mybatis-PageHelper/blob/master/wikis/en/HowToUse.md

    @Override
    public List<User> getList(int page,int rows) {
        PageHelper.startPage(page,rows);  //需要放在getAll的前面
        List<User> list = userMapper.getAll();
        PageInfo pageResult = new PageInfo(list);
        return pageResult.getList();
    }
原文地址:https://www.cnblogs.com/snakejia/p/8320029.html