1.springboot分页查询greenplum数据报错:

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: com.github.pagehelper.PageException: 无法自动获取数据库类型,请通过 helperDialect 参数指定!
### Cause: com.github.pagehelper.PageException: 无法自动获取数据库类型,请通过 helperDialect 参数指定!
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:77)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)
at com.sun.proxy.$Proxy151.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:230)
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:139)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:76)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
at com.sun.proxy.$Proxy171.searchBloomInfoListByDate(Unknown Source)

在application.properties添加如下配置(必须配置在配置文件中,不能在自定义Config类中配置):

pagehelper:
helper-dialect: postgresql
reasonable: true
support-methods-arguments: true
params: true
default-count: true
 page-size-zero: true

2.在Pagehelper的查询语句中,count 函数自动过滤掉了order by语句,特殊情况保留的需在 order by 语句前面添加   /*keep orderby*/  注释标识。

  注:如果使用了druid作为项目的数据库连接池还需配置druid防御SQL注入攻击 druid.wall.commentAllow=true   //是否允许语句中存在注释

Springboot连接Greenplum,分页查询的更多相关文章

  1. C#连接sqlserver分页查询的两个简单的方法

    /// <summary>        /// 分页查询函数        /// </summary>        /// <param name="co ...

  2. springBoot JPA PageAble分页查询出错,PropertyReferenceException: No property creation found for type

    PropertyReferenceException: No property creation found for type @RequestParam(required = false, defa ...

  3. SpringBoot 使用 MyBatis 分页插件 PageHelper 进行分页查询

    前言:本文档使用的是 SpringBoot,如果是 Spring 还需要在 MyBatis 配置 xml 中配置拦截器,并且 PageHelper 是针对 MyBatis 的,MyBatis 的集成不 ...

  4. 分页查询信息(使用jdbc连接mysql数据库实现分页查询任务)

             分页查询信息       使用jdbc连接mysql数据库实现分页查询任务 通过mysql数据库提供的分页机制,实现商品信息的分页查询功能,将查询到的信息显示到jsp页面上. 本项目 ...

  5. spring-boot 集合mybatis 的分页查询

    spring-boot 集合mybatis 的github分页查询 一.依赖包 <!-- mysql 数据库驱动. --> <dependency> <groupId&g ...

  6. SpringBoot-07:SpringBoot整合PageHelper做多条件分页查询

    ------------吾亦无他,唯手熟尔,谦卑若愚,好学若饥------------- 本篇博客讲述如何在SpringBoot中整合PageHelper,如何实现带多个条件,以及PageInfo中的 ...

  7. 数据库SQL Server2012笔记(四)——多表查询、子查询、分页查询、用查询结果创建新表和外连接

    1.多表查询 1)笛卡尔集: select  *  from  表名1,表名2 select  *  from  表名1.表名2  where   表名1.字段名=表名2.字段名 注: 若有两张表有同 ...

  8. springboot结合mybatis使用pageHelper插件进行分页查询

    1.pom相关依赖引入 <dependencies> <dependency> <groupId>org.springframework.boot</grou ...

  9. DQL---连接查询(内连接、外连接)、子查询、分页查询

    一.连接查询 1.连接查询建立在有相互关系的两个表间,进行两个及两个以上的表或视图的查询. 2.对n张表进行查询,至少需要n-1个连接表的条件. 二.笛卡尔积(容易造成数据库宕机) 1.指表中每行元素 ...

  10. SpringBoot整合PageHelper做多条件分页查询

    https://yq.aliyun.com/articles/619586 本篇博客讲述如何在SpringBoot中整合PageHelper,如何实现带多个条件,以及PageInfo中的属性的中文解释 ...

随机推荐

  1. selenium等待的三种方式(详细)

    1.强制等待 time.sleep(3) 这种方式会是操作强行等待3s才会进行下一步操作,但是这种放法,可能会延长测试的时间,如果元素在1s中出现,就会浪费2s的时间,并且这种放法单次有效,每次需要等 ...

  2. Superset 用户集成方案

    注意,一下内容来自外网浏览器翻译,本人使用了将superset集成进入第三方系统,superset采用自定义身份验证+第三系统iframe嵌入方式,但是这个方式存在一个问题,iframe与redire ...

  3. Zino pg walkthrough Intermediate

    nmap 扫描 发现smba共享文件 ┌──(root㉿kali)-[~] └─# nmap -p- -A 192.168.167.64 Starting Nmap 7.94SVN ( https:/ ...

  4. VM1038:1 (in promise) MiniProgramError {"errMsg":"navigateTo:fail webview count limit exceed"} Object解决办法

    在跳转的时候,出现这,有的时候回出现,有的时候不会出现: VM1038:1 (in promise) MiniProgramError {"errMsg":"naviga ...

  5. Iceberg的Copy on Write和Merge On Read介绍

    一.默认的Copy on Write Copy no Write模式指的是在进行更新数据时,先将数据拷贝出来进行相应的更新,再替换掉原先的数据 二.Merge On Read读取时合并 在v2版本才支 ...

  6. [CF696B] Puzzles 题解

    首先很好想到要用树形 \(dp\). 然后设 \(dp_i\) 为遍历到第 \(i\) 个点的期望时间,\(sz_i\) 代表 \(i\) 的子树大小. 发现有转移方程: \[dp_i=dp_{fa_ ...

  7. 【效能提升】我们排查一个bug的过程是怎么样的?

    背景 最近发现团队中一些同学对如何排查一个bug,思路不够清晰.本文随笔整理:常规情况下,我们是如何排查一个bug的. 1. 弄清楚问题 有些人看到"弄清楚问题",可能会觉得好笑, ...

  8. Ansible - [03] Ansible ad-hoc模式

    Ansible ad-hoc是一种通过命令行批量管理的方式 格式:ansible 主机集合 -m 模块名 -a "参数" 其他参数: -k 使用密码远程.-i 指定主机列表文件 以 ...

  9. ABAQUS 中的一些约定

    目录 自由度notation Axisymmetric elements Activation of degrees of freedom Internal variables in Abaqus/S ...

  10. ppt 字少怎么办

    1.加图标 2.加色块 3.加图片 最终效果