zoukankan      html  css  js  c++  java
  • spring cloud turbine

    1. 依赖

    <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.4.RELEASE</version>
    </parent>

    <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.8</java.version>
    </properties>

    <dependencies>
    <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-eureka</artifactId>
    </dependency>

    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <!-- <dependency> -->
    <!-- <groupId>org.springframework.cloud</groupId> -->
    <!-- <artifactId>spring-cloud-starter-ribbon</artifactId> -->
    <!-- </dependency> -->

    <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-hystrix</artifactId>
    </dependency>
    <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-turbine</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>Camden.SR7</version>
    <type>pom</type>
    <scope>import</scope>
    </dependency>

    </dependencies>
    </dependencyManagement>
    </project>

    2. 启动类

    @SpringBootApplication
    @EnableEurekaClient
    @EnableTurbine
    public class TurbineApplication {


    public static void main(String[] args) {
    SpringApplication.run(TurbineApplication.class, args);
    }
    }

    3. 配置

    server:
    port: 8002
    spring:
    application:
    name: turbin
    eureka:
    client:
    serviceUrl:
    defaultZone: http://ym-eureka-server1:8759/eureka/
    instance:
    preferIpAddress: true
    turbine:
    app-config: hystrix,hystrix3
    cluster-name-expression: new String('default')
    combine-host-port: true

  • 相关阅读:
    安装libgl1-mesa-dri:i386重启后黑屏问题解决
    adb连接安卓模拟器
    编译andorid内核
    android镜像文件说明
    ubantu14.04配置android编译环境
    UDP组播相关
    eclipse中如何向开源中国(码云)上传代码
    How to copy a java.util.List into another java.util.List
    Windows中.exe程序的启动过程和C/C++运行时库
    GEF调色板中的多级树结构
  • 原文地址:https://www.cnblogs.com/maohuidong/p/9881169.html
Copyright © 2011-2022 走看看