tubine的作用:用于服务的多节点监控,汇总dashboard的监控数据,进行整体的监控
被监控的服务需要开启端点 即@EnableCircuitBreaker
#加入依赖
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-turbine</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-actuator</artifactId>
</dependency>
#配置文件
server.port=10012
spring.application.name=sys-tool-hystrix-turbine
#注意被监控的服务需要启动 @EnableCircuitBreaker
turbine.app-config=company-info-test,company-info-test2
turbine.aggregator.cluster-config=default
turbine.cluster-name-expression=new String("default")
eureka.client.serviceUrl.defaultZone= http://localhost:8761/eureka/
management.endpoints.web.exposure.include=*
# health,info,env
management.endpoint.health.show-details=always
#启用组件
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@EnableTurbine