turbine起到監控數據聚合的做用
能夠把多臺服務器監控數據聚合起來,一塊兒提供給hystrix儀表盤展示spring
1.添加依賴
turbine/eureka client
2.配置yml
application.yml添加:express
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); } }