【发布时间】:2017-03-19 18:39:39
【问题描述】:
我创建了一个微服务,它具有以下 Spring Cloud 版本 Camden.SR2 的依赖项。春季启动 1.4.1。 http://localhost:8080/hystrix.stream 没有响应。
如果我将 Spring Cloud 版本设为Brixton.*(RELEASE, SR1,...),我在浏览器中只会收到ping: 作为回复。
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
application.properties
spring.application.name=sample-service
server.port = 8080
应用
@SpringBootApplication
@EnableCircuitBreaker
public class SampleApplication {
public static void main(String[] args) {
SpringApplication.run(SampleApplication.class, args);
}
}
【问题讨论】:
标签: spring-cloud hystrix spring-cloud-netflix