Spring Cloud Hystrix断路器模式示例。我在代码中添加了以下依赖项 https://howtodoinjava.com/spring/spring-cloud/spring-hystrix-circuit-breaker-tutorial/ Spring Boot Starter父版本是 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>
当我启动 http://localhost:9098/hystrix 时,什么都没有。
你能指导一下如何解决它吗?
以下是代码:
@SpringBootApplication
@EnableHystrixDashboard
@EnableCircuitBreaker
public class SpringHystrixSchoolServiceApplication {
public static void main(String[] args) {
SpringApplication.run(SpringHystrixSchoolServiceApplication.class, args);
}
}
答案 0 :(得分:0)
由于您使用的是Spring Boot 1.3,因此需要使用http://localhost:9098/hystrix.html
从Spring boot 2.x hystrix URL移至http://localhost:9098/hystrix