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
    

  • 相关阅读:
    第十八周个人作业
    十六周个人作业
    个人作业
    第十四周总结
    第十三周周末总结
    排球计分程序说明书
    我和计算机
    排球比赛记分员
    逻辑思维怎样成为一个高手
    用户故事排球教练助手
  • 原文地址:https://www.cnblogs.com/hardy-wang/p/14142099.html
Copyright © 2011-2022 走看看