zoukankan      html  css  js  c++  java
  • 项目集成hystrix-dashboard

    1.创建项目,修改pom.xml

            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
            </dependency>
    
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
            </dependency>
    
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-actuator</artifactId>
            </dependency>
    

    2.创建main函数

    package com.imooc.springcloud;
    
    import org.springframework.boot.WebApplicationType;
    import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
    import org.springframework.boot.builder.SpringApplicationBuilder;
    import org.springframework.cloud.client.SpringCloudApplication;
    import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
    
    @EnableHystrixDashboard
    @SpringCloudApplication
    public class HystrixDashboardApplication {
        public static void main(String[] args) {
            new SpringApplicationBuilder(HystrixDashboardApplication.class)
                    .web(WebApplicationType.SERVLET)
                    .run(args);
    
        }
    }
    
    

    3.修改配置文件

    spring.application.name=hystrix-dashboard
    server.port=53000
    

  • 相关阅读:
    HDU5618 Jam's problem again
    BZOJ2002弹飞绵羊
    树剖模板
    点分治模板题
    c++ 读入优化、输出优化模板
    牛客网练习赛44-B(快速幂+模拟)
    poj2912(带权并查集+枚举)
    ucore-lab1-练习3report
    poj2492(带权并查集)
    poj1984(带权并查集)
  • 原文地址:https://www.cnblogs.com/hardy-wang/p/14142099.html
Copyright © 2011-2022 走看看