gateway报错Parameter 2 of method redisRateLimiter in org.springframework.cloud.gateway.config.GatewayRedisAutoConfiguration required a bean of type ‘org.springframework.cloud.gateway.support.ConfigurationService’ that could not be found.
问题:gateway测试限流启动报错
Parameter 2 of method redisRateLimiter in org.springframework.cloud.gateway.config.GatewayRedisAutoConfiguration required a bean of type ‘org.springframework.cloud.gateway.support.ConfigurationService’ that could not be found.
gateway配置
cloud:
gateway:
enabled: false
routes:
- id: provider-service-id
#uri: http://localhost:8081
uri: lb://provider-service
predicates:
- Path= /provider/**
filters:
- name: RequestRateLimiter
args:
key-resolver: '#{@ipResolver}'
redis-rate-limiter.replenishRate: 1
redis-rate-limiter.burstCapacity: 2
原因:
神戳戳的设置了这个gateway:enabled: false
解决:
改为true或者直接删掉
见笑了,如果还有人犯这么低级错误,希望能帮到你。