spring-cloud / spring-cloud-gateway

An API Gateway built on Spring Framework and Spring Boot providing routing and more.
http://cloud.spring.io
Apache License 2.0
4.51k stars 3.31k forks source link

Failed to bind properties under 'setter.group-key' to com.netflix.hystrix.HystrixCommandGroupKey #1655

Closed gaopengchao closed 4 years ago

gaopengchao commented 4 years ago

when i run my gateway, there are some wrong: Failed to bind properties under 'setter.group-key' to com.netflix.hystrix.HystrixCommandGroupKey: Property: setter.groupkey Value: groupBsp Origin: "setter.groupKey" from property source "source" Reason: No converter found capable of converting from type [java.lang.String] to type [com.netflix.hystrix.HystrixCommandGroupKey]

my config:

spring:
    gateway:
      discovery:
        locator:
          enabled: true
          lower-case-service-id: true
      routes:
        - id: aep_enable_bspplus
          uri: lb://aep-enable-bspplus
          order: 0
          predicates:
            - Path=/gate/bsp/**
          filters:
            - StripPrefix=2
            - name: Hystrix
              args:
                name: fallbackbsp
                setter:
                  groupKey: groupBsp
                  commandKey:  commandBsp
                  threadPoolKey: threadBsp
                  commandPropertiesDefaults:
                    circuitBreakerRequestVolumeThreshold: 200
                  threadPoolPropertiesDefaults:
                    coreSize: 100
                    maximumSize:  500
                    allowMaximumSizeToDivergeFromCoreSize:  true
                fallbackUri: forward:/fallback

springboot version:2.2.5 springcloud version:Hoxton.SR3

spencergibb commented 4 years ago

Please learn how to properly format code and logs.

The HystrixGatewayFilterFactory.Config.setter was not meant to be used by config files. You can update those values outside of the filter configuration using nomal hystrix properties using the name fallbackbsp.

spring-projects-issues commented 4 years ago

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-projects-issues commented 4 years ago

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.