feat: support autoconfigure WeightedServiceInstanceListSupplier (#1163)

This commit is contained in:
jizhuozhi
2022-10-28 01:24:04 +08:00
committed by GitHub
parent 0a4ee74bca
commit aef64061be
3 changed files with 53 additions and 1 deletions

View File

@@ -935,7 +935,7 @@ By default, we try to read and parse the weight from the metadata map (the key i
If the weight is not specified in the metadata map, we default the weight of this instance to be 1.
You can use this sample configuration to set it up:
You can configure it either by setting the value of `spring.cloud.loadbalancer.configurations` to `weighted` or by providing your own `ServiceInstanceListSupplier` bean, for example:
[[weighted-custom-loadbalancer-configuration]]
[source,java,indent=0]