Updated LoadBalancerProperties and AutoConfiguration
LoadBalancerXtranformerTests added
PR Changes Implemented
Changes Implemented as per PR comments
Updated XForwadedHeadersTransformer name, test classes as per PR Commit on Oct,25, 2021
Addressed PR comments to modify tests with better Assertions
Changed the enabledXforwarded property name to just enabled in Xforwarded class as per PR comments
Client specific configuration goes under `spring.cloud.loadbalancer.clients.<serviceId>.*`. Defaults are set using `spring.cloud.loadbalancer.*`.
Adds LoadBalancerDefaultMappingsProviderAutoConfiguration to supply the loadbalancer defaults mapping to DefaultsBindHandlerAdvisor
LoadBalancerClientsProperties now extends LoadBalancerProperties. The `clients` attribute is now a field. The `@ConfigurationProperties("spring.cloud.loadbalancer")` has moved from LoadBalancerProperties to LoadBalancerClientsProperties
Fixes gh-914
This PR is to fix issue https://github.com/spring-cloud/spring-cloud-commons/issues/906
where loadbalancer healthcheck has query param and
character "?" was automatically
converted to a URI encoding %3F, causing the request to fail.
What has changed
* Using `UriComponentsBuilder.fromUriString` this method parses the string and handles url
and query param path.
* Add stats lifecycle bean. Add onStartRequest method to LoadBalancerLifecycle. Add loadbalancer.Request field to CompletionContext.
* Add TimedRequestContext interface. Make RetryableRequestContext extend RequestDataContext. Improve generating metrics. Add utility class for working with tags. Ensure tags are not null.
* Add separate meters depending on CompletionContext.Status.
* Modify registered metrics. Add adapter for BlockingLoadBalancerClient requests. Add autoconfiguration.
* Make new config conditional on MeterRegistry class.
* Rename lifecycle bean. Do not log request if 0 timestamp.
* Fix onStartRequest call arguments for BlockingLoadBalancerClient.
* Fix onStartRequest and onComplete calls for RetryLoadBalancerInterceptor.
* Only register timed request once. Add tests.
* Adjust tags logic. Add more tests.
* Add more tests.
* Refactor. Add javadocs.
* Refactor.
* Refactor.
* Retrieve client response data if possible in BlockingLoadBalancerClient.
* Refactor.
* Fix docs after review.
* Make previousServiceInstanceMutable.
* Change argument order for CompletionContext constructors. Remove duplicated start time setting.