gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-05 06:13:11 26 4
gpt4 key购买 nike

我使用 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com