pageHelper使用

  • 添加依赖

          com.github.pagehelper
          pagehelper
          5.1.2
      
  • 在mybatis配置文件mybatis.xml添加拦截器插件

        
            //合理化
        
    

注意确保在spring.xml文件指明了mybatis.xml,拦截器才起作用
pageHelper使用_第1张图片

  • 使用时一般在mapper方法调用之前开启分页
  • 在这里插入图片描述
  • 然后在controller层包装
  • pageHelper使用_第2张图片
    更多详细使用可以看看这篇文章
    https://blog.csdn.net/u012562943/article/details/51838759

你可能感兴趣的:(框架)