博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
springcloud11----turbine
阅读量:6423 次
发布时间:2019-06-23

本文共 3583 字,大约阅读时间需要 11 分钟。

package com.itmuch.cloud;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication;import org.springframework.cloud.netflix.turbine.EnableTurbine;//一个turbine server就写完了//turbine是监控整个集群的,@EnableTurbine@SpringBootApplicationpublic class TurbineApplication {  public static void main(String[] args) {    SpringApplication.run(TurbineApplication.class, args);  }}
server:  port: 8031  #http://localhost:8031/turbine.streamspring:  application:    name: microservice-hystrix-turbine#turbine加入eurekaeureka:  client:    serviceUrl:      defaultZone: http://user:password123@localhost:8761/eureka  instance:    prefer-ip-address: true  #turbine加入eurekaturbine:  aggregator:    clusterConfig: default  #监控ribbon-with-hystrix集群(多个端口)和feign-with-hystrix集群(多个状态)  appConfig: microservice-consumer-movie-ribbon-with-hystrix2,microservice-consumer-movie-feign-with-hystrix  clusterNameExpression: "'default'"
4.0.0
com.itmuch.cloud
microservice-spring-cloud
0.0.1-SNAPSHOT
microservice-hystrix-turbine
jar
UTF-8
org.springframework.cloud
spring-cloud-starter-turbine

turbine2的yml文件

server:  port: 8031spring:  application:    name: microservice-hystrix-turbineeureka:  client:    serviceUrl:      defaultZone: http://user:password123@localhost:8761/eureka  instance:    prefer-ip-address: trueturbine:  aggregator:    clusterConfig: MICROSERVICE-CONSUMER-MOVIE-RIBBON-WITH-HYSTRIX2  appConfig: microservice-consumer-movie-ribbon-with-hystrix2  turbine.instanceUrlSuffix.MICROSERVICE-CONSUMER-MOVIE-RIBBON-WITH-HYSTRIX2: /ribbon/hystrix.streamlogging:   level:    root: INFO    com.netflix.turbine.monitor: DEBUG

turbine3的yml文件

server:  port: 8031spring:  application:    name: microservice-hystrix-turbineeureka:  client:    serviceUrl:      defaultZone: http://user:password123@localhost:8761/eureka  instance:    prefer-ip-address: trueturbine:  aggregator:    clusterConfig: MICROSERVICE-CONSUMER-MOVIE-RIBBON-WITH-HYSTRIX3  appConfig: microservice-consumer-movie-ribbon-with-hystrix3  logging:   level:    root: INFO    com.netflix.turbine.monitor: DEBUG

microservice-consumer-movie-ribbon-with-hystrix2的yml文件

spring:  application:    name: microservice-consumer-movie-ribbon-with-hystrix2server:  port: 8010  context-path: /ribbon   #url的前缀eureka:  client:    healthcheck:      enabled: true    serviceUrl:      defaultZone: http://user:password123@localhost:8761/eureka  instance:    prefer-ip-address: true    home-page-url-path: /ribbonhystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 5000#http://localhost:8761/eureka/apps/microservice-consumer-movie-ribbon-with-hystrix2

microservice-consumer-movie-ribbon-with-hystrix3的yml文件

#一个应用有2个端口,一个管理端口一个访问端口management: # spring-boot-starter-acturator管理端口  port: 8081spring:  application:    name: microservice-consumer-movie-ribbon-with-hystrix3server:  port: 8010 #访问端口  context-path: /ribboneureka:  client:    healthcheck:      enabled: true    serviceUrl:      defaultZone: http://user:password123@localhost:8761/eureka  instance:    prefer-ip-address: true    metadata-map:      management.port: 8081hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 5000

 

转载地址:http://whrra.baihongyu.com/

你可能感兴趣的文章
FCT需求分析
查看>>
开门人和关门人(杭电1234)
查看>>
万能adapter
查看>>
开发指南专题六:JEECG微云高速开发平台代码生成
查看>>
cocos2d-x 游戏优化方案
查看>>
1.3 Quick Start中 Step 6: Setting up a multi-broker cluster官网剖析(博主推荐)
查看>>
remote desktop connection manager
查看>>
开源库RxJava、ButterKnife
查看>>
JDK内置工具jstack(Java Stack Trace)(转)
查看>>
[Vue @Component] Pass Props to Vue Functional Templates
查看>>
linux端口开放指定端口的两种方法
查看>>
wpf窗体定位
查看>>
[Algorithms] Insertion sort algorithm using TypeScript
查看>>
SpringBoot+gradle项目构建war
查看>>
Python使用MySQL数据库【转】
查看>>
Android蓝牙——HID开发
查看>>
Android 自定义Dialog中加EditText弹不出键盘跟Dialog遮挡键盘的问题
查看>>
__stdio_common_vsnprintf_s,该符号在函数 _vsnprintf_s_l 中被引用
查看>>
Linux iptables开放特定端口
查看>>
mongodb之 mongodump 与 mongorestore
查看>>