Hystrix 的健康端点不可用

Hystrix's health endpoint not available

我正在尝试将断路器模式与 Springboot 和 Netflix 的 Hystrix 实现结合使用,但我很难访问其运行状况端点。

文档提到它应该在 /hystrix.stream 中可用,但那没有发生。此外,我注意到应用程序初始化时出现以下错误:Endpoint ID 'hystrix.stream' contains invalid characters, please migrate to a valid format.

有人知道如何解决这个问题或如何更改端点名称吗?

版本:

Springboot 2.1.4.RELEASE

Spring Cloud Greenwich.SR1

提前致谢!

对于 spring boot 2.1.x ,hystrix 的默认端点 URL 是 /actuator/hystrix.stream

当服务器启动时,您应该能够在日志中看到类似这样的内容:

INFO 14451 --- [ost-startStop-1] o.s.b.a.e.web.ServletEndpointRegistrar   : Registered '/actuator/hystrix.stream' to hystrix.stream-actuator-endpoint

尝试/actuator/hystrix.stream

尝试在pom.xml中将spring云版本更改为Hoxton.RELEASE:

    <properties>
        <java.version>11</java.version>
        <spring-cloud.version>Hoxton.RELEASE</spring-cloud.version>
    </properties>