提交 c98734a1 编写于 作者: Q qinyingjie

fix:添加备注

上级 cf53e5fa
package com.kwan.springcloud.config; package com.kwan.springcloud.config;
import com.netflix.loadbalancer.IRule; import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule; import com.netflix.loadbalancer.ZoneAvoidanceRule;
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.context.annotation.Configuration;
...@@ -21,6 +21,8 @@ public class RestConfig { ...@@ -21,6 +21,8 @@ public class RestConfig {
*/ */
@Bean @Bean
public IRule microIrule() { public IRule microIrule() {
return new RandomRule(); //return new RandomRule(); //轮训
//return new BestAvailableRule();
return new ZoneAvoidanceRule(); //新版本默认的策略
} }
} }
\ No newline at end of file
...@@ -28,6 +28,8 @@ management: ...@@ -28,6 +28,8 @@ management:
endpoints: endpoints:
web: web:
base-path: /actuator #修改访问路径 2.0之前默认是/ 2.0默认是 /actuator 可以通过这个属性值修改 base-path: /actuator #修改访问路径 2.0之前默认是/ 2.0默认是 /actuator 可以通过这个属性值修改
exposure:
include: *
health: health:
show-details: always #显示健康具体信息 默认不会显示详细信息 show-details: always #显示健康具体信息 默认不会显示详细信息
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册