摘要:
1、‘负载均衡策略种类(默认选择轮询策略) 2、配置负载均衡策略 方法① @Configurationpublic class MyRule { @Bean public IRule rule(){ return new RandomRule(); }} /** * 配置负载均衡策略 * name: 阅读全文
摘要:
1、在RestTemplate配置中添加@LoadBalanced注解 @Configurationpublic class RestTemplateConfig { @LoadBalanced @Bean public RestTemplate restTemplate(){ return new 阅读全文
摘要:
搭建俩个EurekaServer:eureka-server-1,eureka-server-2;然后相互注册,并取相同的应用名称 Server1 server: port: 8761eureka: instance: hostname: eureka-server-1 client: servic 阅读全文