fix nacos-reactive-discovery-example run failed (#3376)

pull/3293/merge
YuLuo 2 years ago committed by GitHub
parent 729dc0c007
commit 50f37bf670
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.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; 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> * @author <a href="mailto:fangjian0423@gmail.com">Jim</a>
*/ */
@SpringBootApplication @SpringBootApplication
@LoadBalancerClients({
@LoadBalancerClient("service-provider")
})
public class ConsumerReactiveApplication { public class ConsumerReactiveApplication {
public static void main(String[] args) { 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.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.client.WebClient; import org.springframework.web.reactive.function.client.WebClient;
/** /**
@ -25,6 +26,8 @@ import org.springframework.web.reactive.function.client.WebClient;
* *
* @author fangjian0423, MieAh * @author fangjian0423, MieAh
*/ */
@Configuration
public class WebClientConfiguration { public class WebClientConfiguration {
@Bean @Bean

Loading…
Cancel
Save