增加 spring-cloud-hystrix用例

This commit is contained in:
罗祥
2019-01-15 17:57:56 +08:00
parent 78f9e43988
commit 7c3e42909c
29 changed files with 813 additions and 0 deletions

View File

@ -0,0 +1,16 @@
package com.heibaiying.eureka;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
@SpringBootApplication
@EnableEurekaServer
public class EurekaApplication {
public static void main(String[] args) {
SpringApplication.run(EurekaApplication.class, args);
}
}

View File

@ -0,0 +1,12 @@
server:
port: 8010
eureka:
instance:
hostname: localhost
client:
# 设置为false,代表不向注册中心注册自己
register-with-eureka: false
# 注册中心主要用于维护服务并不需要检索服务所以设置为false
fetch-registry: false
serviceUrl:
defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/