zoukankan      html  css  js  c++  java
  • myBatis分页插件配置

    由于 Apache公司发现myBatis的分页弊端,所以又研发出得补丁:PageHelper

    中央仓库5.1.2版连接地址:

    <!-- https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper -->
    <dependency>
    <groupId>com.github.pagehelper</groupId>
    <artifactId>pagehelper</artifactId>
    <version>5.1.2</version>
    </dependency>

    设置拦截器:

        1.在myBatis核心配置文件中拦截

    <plugins>
    <!--分页的拦截器地址-->
    <plugin interceptor="com.github.pagehelper.PageInterceptor">
    <!--
          dialect myBatis方言生成相对应的SQL语句,插件可自动识别数据库,默认连接的是mysql,mysql可省略此行
         -->
    <property name="dialect" value=""></property>
        <!--
        reasonable表示分页合理化,类型为布尔类型默认为FALSE 当前默认页码为 1
        -->
         <property name="reasonable" value="ture"></property>

    </plugin>
    </plugins>

        2.在spring核心配置文件中拦截

  • 相关阅读:
    paraview添加vector
    origin横纵坐标颠倒
    [转] python提取计算结果的最大最小值及其坐标
    康奈尔大学CFD课程
    anaconda多环境配置
    mfix的Negative gas density报错解决
    python基础补漏-01
    ssh 公钥登陆的问题
    多进程
    关于GIL
  • 原文地址:https://www.cnblogs.com/chbin/p/10235227.html
Copyright © 2011-2022 走看看