我用 Spring boot 2 尝试了涡轮 + hystrix 仪表板。但我遇到了问题,涡轮仪表板只显示:
正在加载...我有工作的 Eureka 服务器和应用程序(发送正确
的
hystrix.stream)
: ping
data: {"reportingHostsLast10Seconds":0,"name":"meta","type":"meta","timestamp":1533038381277}
我正在寻找很多问题,但我无法得到答案。
这是涡轮 pom 文件:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-cloud.version>Finchley.RELEASE</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>com.netflix.archaius</groupId>
<artifactId>archaius-core</artifactId>
<version>0.7.1</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix-turbine</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>2.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
应用程序属性
server.port=9090
spring.application.name=turbine-dashboard
eureka.client.service-url.defaultZone=http://localhost:8761/eureka
turbine.app-config=RANDOMNUMBERSERVICE
应用程序
@SpringBootApplication
@EnableDiscoveryClient
@EnableTurbine
@EnableHystrixDashboard
public class TurbineTestApplication {
public static void main(String[] args) {
SpringApplication.run(TurbineTestApplication.class, args);
}
}