标签:rgs oid ase service 抓取 负载均衡 设置 host cli
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
server:
port: 8001
spring:
application:
name: cloud-provider-hystrix-payment #服务名
eureka:
client:
#表示是否将自己注册进EurekaServer默认为true
register-with-eureka: true
#是否从EurekaServer抓取已有的注册信息,默认为true,单节点无所谓,集群必须设置为true才能配合ribbon使用负载均衡
fetch-registry: true
service-url:
defaultZone: http://eureka7001.com:7001/eureka,http://eureka7002.com:7002/eureka #集群版
#defaultZone: http://localhost:7001/eureka 单机版
@SpringBootApplication
@EnableEurekaClient
@EnableCircuitBreaker
public class PaymentMainHystrix8001 {
public static void main(String[] args) {
SpringApplication.run(PaymentMainHystrix8001.class,args);
}
}
标签:rgs oid ase service 抓取 负载均衡 设置 host cli
原文地址:https://www.cnblogs.com/fuqiang-zhou/p/12612213.html