Introducing Sorting when binding yaml properties to OperationMethod in findOperation
#3397
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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. (#3172 )
Description
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
findOperation
will iterate all possible Configuration Injection Methods to the matching properties provided by yaml file.In this situation,
String ID
value was bound to wrong Injection Method(that requiresCircuitConfig
) thereby failing to create aCircuitBreaker
instance.a. given yaml file value: name:customerCircuitBreaker
b. matched property value: CircuitBreaker(CircuitConfig)
By processing Configurable method for the last, CircuitBreaker(String id) that should have been matched will have priorities over CircuitBreaker(CircuitConfig).
Resolves #3327