本文整理汇总了Java中org.springframework.cloud.client.loadbalancer.LoadBalancerClient类的典型用法代码示例。如果您正苦于以下问题:Java LoadBalancerClient类的具体用法?Java LoadBalancerClient怎么用?Java LoadBalancerClient使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LoadBalancerClient类属于org.springframework.cloud.client.loadbalancer包,在下文中一共展示了LoadBalancerClient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setup
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; //导入依赖的package包/类
@Before
public void setup() {
client = spy(LoadBalancerClient.class);
doReturn(null).when(client).choose(TOKEN_SERVICE_ID);
doAnswer(new Answer<URI>() {
@Override
public URI answer(InvocationOnMock invocation) throws Throwable {
return invocation.getArgumentAt(1, URI.class);
}
}).when(client).reconstructURI(any(), any());
recorder = LogbackRecorder.forClass(LoadBalancedResourceDetails.class).reset().capture("ALL");
}
示例2: ServiceUtils
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; //导入依赖的package包/类
@Autowired
public ServiceUtils(
@Value("${server.port}") String port,
LoadBalancerClient loadBalancer) {
this.port = port;
this.loadBalancer = loadBalancer;
}
示例3: setLoadBalancer
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; //导入依赖的package包/类
@Autowired(required = false)
public void setLoadBalancer(LoadBalancerClient loadBalancer) {
this.loadBalancer = loadBalancer;
}
示例4: ProfilesClient
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; //导入依赖的package包/类
@Autowired
public ProfilesClient(LoadBalancerClient loadBalancer) {
this.loadBalancer = loadBalancer;
}
示例5: setLoadBalancerClient
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; //导入依赖的package包/类
@Autowired(required = false)
public void setLoadBalancerClient(LoadBalancerClient loadBalancerClient) {
this.loadBalancerClient = loadBalancerClient;
}
示例6: DiscoveryClientConsole
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; //导入依赖的package包/类
@Autowired
public DiscoveryClientConsole(LoadBalancerClient loadBalancerClient, DiscoveryClient discoveryClient) {
this.loadBalancerClient = loadBalancerClient;
this.discoveryClient = discoveryClient;
}
示例7: loadBalancerClientFilter
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; //导入依赖的package包/类
@Bean
@ConditionalOnBean(LoadBalancerClient.class)
public LoadBalancerClientFilter loadBalancerClientFilter(LoadBalancerClient client) {
return new LoadBalancerClientFilter(client);
}
开发者ID:spring-cloud,项目名称:spring-cloud-gateway,代码行数:6,代码来源:GatewayLoadBalancerClientAutoConfiguration.java
示例8: LoadBalancerClientFilter
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; //导入依赖的package包/类
public LoadBalancerClientFilter(LoadBalancerClient loadBalancer) {
this.loadBalancer = loadBalancer;
}
示例9: LoadBalancedResourceDetails
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; //导入依赖的package包/类
public LoadBalancedResourceDetails(LoadBalancerClient loadBalancerClient) {
this.loadBalancerClient = loadBalancerClient;
}
示例10: TraversonFactory
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; //导入依赖的package包/类
public TraversonFactory(LoadBalancerClient loadBalancerClient) {
this.loadBalancerClient = loadBalancerClient;
}
示例11: RibbonAsyncClientHttpRequestFactory
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; //导入依赖的package包/类
public RibbonAsyncClientHttpRequestFactory(LoadBalancerClient loadBalancer) {
this.loadBalancer = loadBalancer;
}
示例12: asyncRequestFactory
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; //导入依赖的package包/类
@Bean
public RibbonAsyncClientHttpRequestFactory asyncRequestFactory(LoadBalancerClient loadBalancerClient) {
RibbonAsyncClientHttpRequestFactory requestFactory = new RibbonAsyncClientHttpRequestFactory(loadBalancerClient);
requestFactory.setTaskExecutor(new SimpleAsyncTaskExecutor());
return requestFactory;
}
示例13: asyncRestTemplate
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; //导入依赖的package包/类
@Bean
public AsyncRestTemplate asyncRestTemplate(LoadBalancerInterceptor interceptor, LoadBalancerClient loadBalancer) {
return asyncRest(interceptor, loadBalancer);
}
示例14: traversonFactory
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; //导入依赖的package包/类
@Bean
public TraversonFactory traversonFactory(LoadBalancerClient loadBalancerClient) {
return new TraversonFactory(loadBalancerClient);
}
示例15: LoadBalancerClientZipkinLoadBalancer
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; //导入依赖的package包/类
LoadBalancerClientZipkinLoadBalancer(LoadBalancerClient loadBalancerClient,
ZipkinProperties zipkinProperties) {
this.loadBalancerClient = loadBalancerClient;
this.zipkinProperties = zipkinProperties;
}