Skip to content

problems upgrade

liubao edited this page Aug 16, 2022 · 6 revisions

升级常见问题

governance 变化

  • 问题描述

从 Spring Cloud Huawei老版本升级到1.10.4及其以上版本,Gateway启动报告错误:

Caused by: java.lang.IllegalArgumentException: Unable to find GatewayFilterFactory with name governance
  • 问题原因和解决方案

1.10.4及其以上版本不需要显示的在routes里面启用 governance Filter。删除即可。

spring:
  cloud:
    gateway:
      discovery:
        locator:
          enabled: true
          lowerCaseServiceId: true
      routes:
        - id: price
          uri: lb://price
          predicates:
            - Path=/gateway/**
          filters:
            ## 删除 -name governance 配置
            - name: governance
            - name: Retry
              args:
                retries: 3
                series: SERVER_ERROR
Clone this wiki locally