0

我正在使用 Hystrix 和 Hystrix Dashboard 查看错误。当 hystrix 流工作文件时,Hystrix 仪表板显示“正在加载...”消息,并且不显示故障或图表。

** GatewayServer 中使用的注解 **

@SpringBootApplication
@EnableEurekaClient
@EnableHystrix

** GatewayServer 的 application.properties 中的 Hystrix 条目 **

management.endpoints.web.exposure.include=hystrix.stream
hystrix.command.fallbackcmd.execution.isolation.thread.timeoutInMilliseconds=5000

** GatewayServer 的 POM.XML 的详细信息 **

<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.10-SNAPSHOT</version>

<properties>
    <java.version>11</java.version>
    <spring-cloud.version>2020.0.5</spring-cloud.version>
</properties>


<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-gateway</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-circuitbreaker-reactor-resilience4j</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
    <version>2.2.10.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>

** 用于 Hystrix Dashboard 的注解 **

@SpringBootApplication
@EnableHystrixDashboard
@EnableHystrix

** Hystrix Dashboard 的 application.properties 中的 Hystrix 条目 **

management.endpoints.web.base-path=/
management.endpoints.web.exposure.include=*
hystrix.dashboard.proxy-stream-allow-list=*

** GatewayServer 的 POM.XML 的详细信息 **

<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.10-SNAPSHOT</version>

<properties>
    <java.version>11</java.version>
    <spring-cloud.version>2020.0.5</spring-cloud.version>
</properties>

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

0 回答 0