提交 1a5e52a0 编写于 作者: Q qinyingjie

fix:添加备注

上级 c98734a1
package com.kwan.springcloud.config;
import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.ZoneAvoidanceRule;
import com.netflix.loadbalancer.RoundRobinRule;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......@@ -21,8 +21,9 @@ public class RestConfig {
*/
@Bean
public IRule microIrule() {
//return new RandomRule(); //轮训
return new RoundRobinRule(); //轮训
//return new RandomRule(); //随机
//return new BestAvailableRule();
return new ZoneAvoidanceRule(); //新版本默认的策略
// return new ZoneAvoidanceRule(); //新版本默认的策略
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册