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即可看到监控面板
  • 相关阅读:
    aps.net 图形验证码(转)
    js浮点数计算问题 + 金额大写转换
    meta标签总结
    Asp.net Session 保存到MySql中
    css3实现边框圆角样式
    iOS开发之NSOperation & NSOperationQueue
    iOS开发之多线程
    iOS开发之Block
    iOS开发之核心动画(Core Animation)
    iOS开发之CALayer
  • 原文地址:https://www.cnblogs.com/geniushuangxiao/p/7282675.html
Copyright © 2011-2022 走看看