Introducing Sorting when binding yaml properties to OperationMethod in `findOperation`
0. Summary: After the introduction of @Configurable to Retry and CircuitBreakerFilterSupplier, Yaml bindings start to fail. Debugging statements made for yaml bindings without @Configurable were not visibile as @Configurable bypass most of existing logic for Exceptions and Debugging statements. (https://github.com/spring-cloud/spring-cloud-gateway/issues/3172 )
Description
- In a raised issue(#3327), given yaml file to configure CircuitBreakerConfig seems to fail and produce an error below:
-
given a Configuration Bean, the properties were bound successfully and CircuitBreaker was created successfully.
-
in a situation where yaml file was passed on, CircuitBreaker failed to create.
We can safely assume that creating circuitBreaker fails when using yaml file
Context and Background
-
findOperationwill iterate all possible Configuration Injection Methods to the matching properties provided by yaml file. -
In this situation,
String IDvalue was bound to wrong Injection Method(that requiresCircuitConfig) thereby failing to create aCircuitBreakerinstance.
a. given yaml file value: name:customerCircuitBreaker b. matched property value: CircuitBreaker(CircuitConfig)
- this is result of the above code where @Configurable operation method always return despite yaml property value.
By processing Configurable method for the last, CircuitBreaker(String id) that should have been matched will have priorities over CircuitBreaker(CircuitConfig).
Resolves #3327
@spencergibb any updates on PR?? I am really looking forward contributing to the project. Please let me know your thoughts!