zoukankan      html  css  js  c++  java
  • 006服务监控看板Hystrix Dashboard

    1、POM配置

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

    <dependencies>
      <!--添加Turbine依赖-->   <dependency>     <groupId>org.springframework.cloud</groupId>     <artifactId>spring-cloud-starter-hystrix-dashboard</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
    @EnableHystrixDashboard//使能HystrixDashboard
    public class Application {
        public static void main(String[] args) {
            SpringApplication.run(Application.class, args);
        }
    }

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

    spring:
      application:
        name: hystrix-dashboard
    server:
      port: 4010
    04、使用方法
      a)浏览器访问http://localhost:4010/hystrix.dashboard
      b)Hystrix Dashboard下输入http://localhost:4001/turbine.stream,点击Monitor Stream即可看到监控面板
  • 相关阅读:
    JUnit快速入门
    CoreJava笔记之线程
    CoreJava笔记之JavaBean、静态方法static和final
    CoreJava基础之构造器
    JAVA环境配置
    软件测试工程师应该具备的能力
    Apache和Tomcat的整合过程(转载)
    ios界面适配和图标的各种大小
    iPhone6和iPhone6 plus的iOS8设计尺寸参考指南
    博主写的非常详细的ios网络请求、uiwebview与js交互
  • 原文地址:https://www.cnblogs.com/geniushuangxiao/p/7282675.html
Copyright © 2011-2022 走看看