Mysql(mariabDB)迁移国产数据库人大金仓(KingBase8)报错问题

1,报错信息:com.github.pagehelper.PageException:无法自动获取数据库类型,请通过helperDialect参数指定!

  1>.使用Mybatis设置如下:

    <plugins>

                   <!-- com.github.pagehelper为PageHelper类所在包名 -->

                   <plugin interceptor="com.github.pagehelper.PageInterceptor">

                            <property name="helperDialect" value="postgresql" />

                   </plugin>

          </plugins>

  2>.springboot整合mybatis使用如下:

    在pom文件中引入Pagehelper分页插件:

           <!-- 分页插件 -->

           <dependency>

               <groupId>com.github.pagehelper</groupId>

               <artifactId>pagehelper-spring-boot-starter</artifactId>

               <version>1.2.5</version>

           </dependency>

    配置分页插件,打开application.properties,添加如下配置信息:pagehelper.helper-dialect=postgresql

上一篇:【死磕 Java 基础】— 我同事一个 select 分页语句查出来了 3000W 条数据


下一篇:mysql中用limit 进行分页有两种方式