|
|
|
@ -17,7 +17,9 @@
@@ -17,7 +17,9 @@
|
|
|
|
|
package org.springframework.cloud.netflix.ribbon.eureka; |
|
|
|
|
|
|
|
|
|
import javax.annotation.PostConstruct; |
|
|
|
|
import javax.inject.Provider; |
|
|
|
|
|
|
|
|
|
import com.netflix.discovery.EurekaClient; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; |
|
|
|
@ -89,9 +91,9 @@ public class EurekaRibbonClientConfiguration {
@@ -89,9 +91,9 @@ public class EurekaRibbonClientConfiguration {
|
|
|
|
|
|
|
|
|
|
@Bean |
|
|
|
|
@ConditionalOnMissingBean |
|
|
|
|
public ServerList<?> ribbonServerList(IClientConfig config) { |
|
|
|
|
public ServerList<?> ribbonServerList(IClientConfig config, Provider<EurekaClient> eurekaClientProvider) { |
|
|
|
|
DiscoveryEnabledNIWSServerList discoveryServerList = new DiscoveryEnabledNIWSServerList( |
|
|
|
|
config); |
|
|
|
|
config, eurekaClientProvider); |
|
|
|
|
DomainExtractingServerList serverList = new DomainExtractingServerList( |
|
|
|
|
discoveryServerList, config, this.approximateZoneFromHostname); |
|
|
|
|
return serverList; |
|
|
|
|