一。问题背景:服务可以成功在nacos注册,且健康状态为true

但是访问/actuator/health为Down,

访问/actuator可以正常返回

解决方案:
在bootstrap.properties中新增两行:
management.endpoints.web.exposure.include=*
managent.endpoint.health.show-details=always
重启服务,并再次访问/actuator/health,可以看到日志

关闭Redis检测开关(涉及到的类RedisHealthContributorAutoConfiguration、ConditionalOnEnabledHealthIndicator、OnEnabledHealthIndicatorCondition):
在bootstrap.properties中新增一行:management.health.redis.enabled=false
重启服务后,再次访问/actuator/health,此时状态为UP。
1567





