【发布时间】:2018-02-27 11:37:03
【问题描述】:
有没有办法禁用下面列出的 hystrix 自定义健康检查 -
@Component
@ConditionalOnClass(name = "org.springframework.cloud.netflix.hystrix.HystrixHealthIndicator")
public class XspHystrixHealthIndicator extends AbstractHealthIndicator {
当我检查 localhost:8080/health 时,我看到以下内容
{
"status": "UP",
"xspHystrix": {
"status": "UP"
},
"manualSwitch": {
"status": "UP"
},
"redis": {
"status": "UP",
"version": "3.0.7"
},
"hystrix": {
"status": "UP"
}
}
我不希望列出 xspHystrix 和 hystrix,它们不应该成为健康检查的一部分。
我添加了以下属性并且不再看到 hystrix,但我仍然看到我不想显示的 xspHystrix -
management:
health:
hystrix:
enabled: false
xspHystrix:
enabled: false
【问题讨论】:
-
你应该使用
health.config.enabled=false -
我只想禁用上面列出的 hystrix。有办法吗?
标签: java spring-boot