乐趣区

关于后端:turbine

turbine

turbine 起到监控数据聚合的作用
能够把多台服务器监控数据聚合起来, 一起提供给 hystrix 仪表盘展示

搭建 turbine 步骤

1. 增加依赖
turbine/eureka client
2. 配置 yml
application.yml 增加:

spring:
  application:
    name: turbin
    
server:
  port: 5001
  
eureka:
  client:
    service-url:
      defaultZone: http://eureka1:2001/eureka, http://eureka2:2002/eureka
      
turbine:
  app-config: order-service
  cluster-name-expression: new String("default")

2. 启动类
启动类增加注解 @EnableTurbine

@EnableTurbine
@SpringBootApplication
public class Sp10TurbineApplication {public static void main(String[] args) {SpringApplication.run(Sp10TurbineApplication.class, args);
    }
}
退出移动版