码迷,mamicode.com
首页 > 其他好文 > 详细

006hystrix.stream信息聚合Turbine

时间:2017-08-03 23:44:44      阅读:375      评论:0      收藏:0      [点我收藏+]

标签:client   one   color   type   group   ica   exp   hystrix   ring   

1、POM配置

  和普通Spring Boot工程相比,仅仅添加了Turbine和Spring Boot Starter Actuator依赖

<dependencies>
  <!--添加Turbine依赖-->
  <dependency>     <groupId>org.springframework.cloud</groupId>     <artifactId>spring-cloud-starter-turbine</artifactId>   </dependency>
  <!--添加Turbine依赖-->
  <dependency>     <groupId>org.springframework.cloud</groupId>     <artifactId>spring-cloud-netflix-turbine</artifactId>   </dependency>   <dependency>     <groupId>org.springframework.boot</groupId>     <artifactId>spring-boot-starter-actuator</artifactId>   </dependency> </dependencies> <dependencyManagement>   <dependencies>     <dependency>       <groupId>org.springframework.cloud</groupId>       <artifactId>spring-cloud-dependencies</artifactId>       <version>Dalston.SR2</version>       <type>pom</type>       <scope>import</scope>       </dependency>   </dependencies> </dependencyManagement>

02、使能Eureka Server

@SpringBootApplication
@EnableTurbine//使能Turbine
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}

03、src/main/resources工程配置文件application.yml内容如下

spring:
  application.name: turbine-service-monitoring
server:
  port: 4001
#security.basic.enabled: false
turbine:
  aggregator:
    clusterConfig: default   # 指定聚合哪些集群,多个使用","分割,默认为default。
  appConfig: ribbon-hello-service-consumer, feign-hello-service-consumer   ### 配置Eureka中的serviceId列表,表明监控哪些服务
  clusterNameExpression: new String("default")
eureka:
  client:
    serviceUrl:
      defaultZone: http://discovery:1000/eureka/

006hystrix.stream信息聚合Turbine

标签:client   one   color   type   group   ica   exp   hystrix   ring   

原文地址:http://www.cnblogs.com/geniushuangxiao/p/7219507.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!