Spring Cloud Turbine AMQP 不适用于 Hystrix 仪表板

Spring Cloud Turbine AMQP doesn't working with Hystrix Dashboard

我正在尝试设置 spring 云涡轮机 amqp 和 hystrix 仪表板。但是当我启动所有应用程序时,hystrix 仪表板没有显示任何内容: hystrix-dashboard-screenshot-link

但是当我打开涡轮流link时,我看到的不是空数据: turbine-stream-data-screenshot-link

当我停止我的涡轮机服务和 运行 样本时:https://github.com/spring-cloud-samples/turbine

正在运行: working-hystrix-dashboard-screenshot-link

所以,问题出在我的涡轮机服务上。 这是 TurbineApplication.java:

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.turbine.stream.EnableTurbineStream;

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

这是application.yml:

server:
  port: ${PORT:8989}

eureka:
  user:
    name: "{cipher}6c627b546202f13ffa9e3edf39974a3bfca5d615f58dcbfc23065661968b13c5"
    password: "{cipher}75efd89c7c4d79220a5b3f35e9ad692a69c820fa0b99e9c48ae9433d45ba016db808ab9dce78382235e529291f8aa0be"
  instance:
    preferIpAddress: true
  client:
    registerWithEureka: true
    fetchRegistry: true
    serviceUrl:
      defaultZone: http://${eureka.user.name}:${eureka.user.password}@127.0.0.1:8761/eureka/

这是bootstrap.yml:

spring:
  application:
    name: turbine-service

这是gradle.build:

buildscript {
    ext {
        springBootVersion = '1.5.9.RELEASE'
        dockerPluginVersion = '1.2'
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
        classpath("se.transmode.gradle:gradle-docker:${dockerPluginVersion}")
    }
}

apply plugin: 'java'
apply plugin: 'docker'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'

group = 'com.pda'

jar {
    baseName = 'turbine-service'
    version = 'latest'
}

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}


ext {
    springCloudVersion = 'Edgware.RELEASE'
}

dependencies {
    compile('org.springframework.boot:spring-boot-starter-actuator')
    compile('org.springframework.boot:spring-boot-starter-web')

    compile('org.springframework.cloud:spring-cloud-starter-turbine-stream')
    compile('org.springframework.cloud:spring-cloud-starter-stream-rabbit')

}

dependencyManagement {
    imports {
        mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
    }
}

eclipse {
    classpath {
        containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER')
        containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8'
    }
}

task buildDocker(type: Docker, dependsOn: build) {
    push = false
    applicationName = jar.baseName
    dockerfile = file('src/main/docker/Dockerfile')
    doFirst {
        copy {
            from jar
            into stageDir
        }
    }
}

看来问题出在依赖版本上。

问题出在 Edgware.RELEASE(和 Edgware.SR1)版本中。需要降级spring云版本(比如降到Dalston.SR5),或者使用Edgware.BUILD-SNAPSHOT。

描述:https://github.com/spring-cloud/spring-cloud-netflix/issues/2637