gpt4 book ai didi

spring-boot - 启用 eureka.client.healthcheck

转载 作者:行者123 更新时间:2023-12-03 22:44:54 27 4
gpt4 key购买 nike

我正在关注 http://cloud.spring.io/spring-cloud-netflix/spring-cloud-netflix.html使用 Spring Cloud 构建分布式系统。

除了 Eureka Client Healthcheck 之外,一切都按预期工作。

我有

Eureka :
客户:
健康检查:
启用:真

并将我的服务指向不存在的 config_server,这导致

http://myservice:8080/health
{
状态:“下降”
}

但是 Eureka 服务器仍然将此实例显示为 UP 并继续向其发送流量。

我错过了什么?

Spring Boot :1.2.8.RELEASE

spring-cloud-netflix:1.0.4.RELEASE

最佳答案

您必须明确设置 eureka.client.healthcheck.enabled=true将 Spring Boot 健康指标链接到 Eureka 注册。源码引用:here .

关于spring-boot - 启用 eureka.client.healthcheck,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35012941/

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