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