minor fix (#1342)
This commit is contained in:
@@ -14,7 +14,13 @@ TIP: It is possible to disable Spring Cloud LoadBalancer by setting the value of
|
||||
|
||||
Spring Cloud LoadBalancer creates a separate Spring child context for each service id. By default, these contexts are initialised lazily, whenever the first request for a service id is being load-balanced.
|
||||
|
||||
You can choose to load those contexts eagerly. In order to do that, specify the service ids for which you want to do eager load using the `spring.cloud-loadbalancer.eager-load.clients` property.
|
||||
You can choose to load those contexts eagerly. In order to do that, specify the service ids for which you want to do eager load using the `spring.cloud.loadbalancer.eager-load.clients` property, for example:
|
||||
|
||||
[source]
|
||||
----
|
||||
spring.cloud-loadbalancer.eager-load.clients[0]=my-first-client
|
||||
spring.cloud-loadbalancer.eager-load.clients[1]=my-second-client
|
||||
----
|
||||
|
||||
[[switching-between-the-load-balancing-algorithms]]
|
||||
== Switching between the load-balancing algorithms
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2021 the original author or authors.
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.springframework.cloud.client.loadbalancer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
@@ -27,7 +26,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
@ConfigurationProperties("spring.cloud.loadbalancer.eager-load")
|
||||
public class LoadBalancerEagerLoadProperties {
|
||||
|
||||
private List<String> clients = new ArrayList<>();
|
||||
private List<String> clients = List.of();
|
||||
|
||||
public List<String> getClients() {
|
||||
return clients;
|
||||
|
||||
Reference in New Issue
Block a user