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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM