java - Hystrix 仪表板始终显示加载屏幕

标签 java spring-boot netflix-eureka hystrix hystrix-dashboard

我使用 Netflix-OSS 库开发了微服务应用程序。我在 localhost:9091/hystrix 上运行的 Hystrix 仪表板上遇到问题。我想监控微服务-A 和微服务-B 之间的请求指标。端点“hystrix.stream”已注册。

hystrix 仪表板卡在加载中,没有显示任何结果。

我检查了浏览器,发现 jquery 错误 - Uncaught TypeError: e.indexOf is not a function 这似乎是一个 jquery 版本问题。

我正在使用 Jdk 14 版本和 Spring boot 2.3 进行开发

最佳答案

            @bob0the0mighty
            I am adding code snippet for your reference. This is my springboot main class
            @SpringBootApplication
            @EnableEurekaClient
            @EnableCircuitBreaker
            @EnableHystrixDashboard
            public class DramaServiceApplication {
            }
        My controller looks like :
        @GetMapping("/acts")
            @com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand(fallbackMethod = "fallbackMethodForGetActor", commandKey = "test-Act", groupKey = "test-Act")
            public ActorList getActors() {
                ActorList actorList = restTemplate.getForObject("http://actor-service/actor/actorsList", ActorList.class);
                return actorList;
            }
    public ActorList fallbackMethodForGetActor() {
            return new ActorList(" Requested Actor page is under maintenance!!");
        }
    
    application.yml file looks like :
            
    management:
      endpoints:
        web:
          base-path: /
          exposure:
            include: hystrix.stream, health, info, metrics
After hitting request multiple times, I am getting hystrix dashboard as "loading" always
and screen looks like 
[enter image description here][1]
                


  [1]: /image/hOeZf.png

关于java - Hystrix 仪表板始终显示加载屏幕,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63393432/

相关文章:

java - 如何从事务性 Spring 服务中抛出自定义异常?

java - Gradle 创建的 jar 找不到 webdriver

java - Spring Boot 使用 Yaml 而不是属性文件

java - 如何将 Eureka 名称与 OAuth2RestTemplate 一起使用

java - 即使微服务已在 Eureka 服务发现中注册,Netflix ZuulProxy也会返回 HTTP 错误 500

java - 微服务在 Eureka 上注册 Docker 内部 IP,而不是公共(public) IP

Java hibernate : How to set column varchar to max?

移动到另一个位置时 Java jar 文件不起作用

java - 如何在 Activiti Service Task 中立即将实体持久保存/提交到数据库

spring - 在 Spring Boot 中读取文件的最佳方式