fixed the issue that webClient could not call the nacos service (#3254)

pull/3270/head
YuLuo 2 years ago committed by GitHub
parent 74ee0a65ae
commit 7134c21969
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -18,11 +18,17 @@ package com.alibaba.cloud.examples;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClient;
import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClients;
/**
* @author <a href="mailto:fangjian0423@gmail.com">Jim</a>
*/
@SpringBootApplication
@LoadBalancerClients({
@LoadBalancerClient("service-provider")
})
public class ConsumerReactiveApplication {
public static void main(String[] args) {

@ -18,6 +18,7 @@ package com.alibaba.cloud.examples;
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;
/**
@ -25,6 +26,8 @@ import org.springframework.web.reactive.function.client.WebClient;
*
* @author fangjian0423, MieAh
*/
@Configuration
public class WebClientConfiguration {
@Bean

Loading…
Cancel
Save