【发布时间】:2019-02-03 06:04:31
【问题描述】:
我正在尝试创建一个独立的应用程序来从其他应用程序收集 Hystrix 流。但默认情况下它不会暴露 /turbine.stream 端点。我确信我的项目中缺少什么。
Spring Boot:2.0.4.RELEASE,Spring Cloud:Finchley.SR1
应用类:
@SpringBootApplication
@EnableDiscoveryClient
@EnableTurbine
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
applicaiton.yml的内容:
server:
port: 8383
spring:
application:
name: hystrix-turbine
management:
endpoints:
web.exposure.include: '*'
applications: hystrix
turbine:
aggregator:
clusterConfig: ${applications}
appConfig: ${applications}
# instanceUrlSuffix.default: actuator/hystrix.stream
以及 maven 依赖项:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-turbine</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
我为此创建了一个sample project。
【问题讨论】:
-
调用 /turbine.stream 端点后会收到什么?
标签: spring spring-boot spring-cloud spring-cloud-netflix