Spring Cloud - hystrix-dashboard 不起作用? [英] Spring Cloud - hystrix-dashboard is not working?

查看:24
本文介绍了Spring Cloud - hystrix-dashboard 不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Spring Cloud Hystrix 断路器 模式示例.我在代码中添加了以下依赖项

代码如下:

@SpringBootApplication@EnableHystrixDashboard@EnableCircuitBreaker公共类 SpringHystrixSchoolServiceApplication {公共静态无效主(字符串 [] args){SpringApplication.run(SpringHystrixSchoolServiceApplication.class, args);}}

解决方案

由于你使用的是 spring boot 1.3,你需要使用 http://localhost:9098/hystrix.html

从 Spring boot 2.x hystrix URL 移动到 http://localhost:9098/hystrix

Spring Cloud Hystrix Circuit Breaker Pattern Example. I have added below dependency in the code taking https://howtodoinjava.com/spring/spring-cloud/spring-hystrix-circuit-breaker-tutorial/ Spring Boot Starter parent version is 1.5.13.BUILD-SNAPSHOT

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
</dependency>

When I launch http://localhost:9098/hystrix, nothing is coming.

Could you please guide how to fixed it ?

Here is the code:

@SpringBootApplication
@EnableHystrixDashboard
@EnableCircuitBreaker
public class SpringHystrixSchoolServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringHystrixSchoolServiceApplication.class, args);
    }
}

解决方案

Since you are using spring boot 1.3,you need to use http://localhost:9098/hystrix.html

From Spring boot 2.x hystrix URL move to http://localhost:9098/hystrix

这篇关于Spring Cloud - hystrix-dashboard 不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆