zoukankan      html  css  js  c++  java
  • pageHelper使用时的注意点

     

    1 在pom.xml中导入相关的依赖(注意版本问题,报错十有八九是因为版本问题)

            <dependency>
                <groupId>com.github.pagehelper</groupId>
                <artifactId>pagehelper-spring-boot-starter</artifactId>
                <version>1.2.3</version>
            </dependency>    

    2 在yml配置文件中输入相关配置

    pagehelper:
      helper-dialect: mysql
      reasonable: true
      support-methods-arguments: true
      params: count=countSql

    3 使用 (个人推荐返回值为PageHelper方式)

    3.1 返回page对象(注意,查询语句必须紧跟着pagehelper语句,否则会报错。 )

    返回的为需要查询的数据集合

    3.2 返回pagehelper对象

    返回的值为需要查询的数据集合以及一系列分页信息

  • 相关阅读:
    chrome.declarativeWebRequest
    webRequest模块的解读
    C#连接池
    sftp
    Lynx
    LD_PRELOAD & LD_LIBRARY_PATH 动态库路径
    libc.so.6 误删后修复
    man 转 pdf _____ jpg 转 pdf
    here文档
    lsof fuser
  • 原文地址:https://www.cnblogs.com/cl-rr/p/9638711.html
Copyright © 2011-2022 走看看