那本来就是我的光 2020-09-17 15:13 采纳率: 60%
浏览 3255
已采纳

springboot 使用 PageHelper 进行分页报错 :无法自动获取数据库类型,请通过 helperDialect 参数指定!

配置文件

图片说明

if (StringUtils.isNotBlank(key)) {
            criteria.andLike("channelName", "%" + key + "%");
        }
        PageHelper.startPage(page, rows);
        List<FrontChannel> frontChannels = this.channelMapper.selectByExample(example);

图片说明

  • 写回答

2条回答 默认 最新

  • sanshizhang 2020-09-17 16:55
    关注

    需要添加以下配置:

    PageHelper分页插件

    pagehelper:
    helperDialect: oracle
    reasonable: true
    supportMethodsArguments: true
    params: count=countSql

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?