You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
UCO-BS/src/main/java/com/mfsys/uco/config/WebClientconfiguration.java

36 lines
906 B
Java

package com.mfsys.uco.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.client.WebClient;
@Configuration
public class WebClientconfiguration {
@Value("${base.ciihive}")
private String ciihive;
@LoadBalanced
@Bean
public WebClient.Builder loadBalancedWebClientBuilder() {
return WebClient.builder();
}
@Bean
public WebClient webClientDeposit() {
// return WebClient.create("http://localhost:9095");
return WebClient.create(ciihive);
}
@Bean
public WebClient webClientCrm() {
return WebClient.create(ciihive);
// return WebClient.create("http://localhost:9096");
}
}