我使用的是 Apache Camel Spring boot(3.1.2),Camel 版本是 4.0.0。健康检查已启用,它正在工作,但是 /health 总是返回 UP/DOWN,没有详细信息,即使我将暴露级别设置为完整:
management:
endpoints:
web:
base-path: "/"
exposure:
include: health,info,loggers,camelroutes
probes:
enabled: true
health:
show-details: always
health:
livenessState:
enabled: true
readinessState:
enabled: true
camel:
springboot:
route-controller-supervise-enabled: true
route-controller-back-off-max-attempts: 10
health:
enabled: true
# level of details exposed by camel-health check (full, default, or oneline)
exposure-level: full
producers-enabled: true
registry-enabled: true
consumers-enabled: true
routes-enabled: true
将曝光级别设置为全时,应该会显示更多细节。
你的路径错误,你设置了
endpoints
,但路径应该是management.endpoint.health.show-details
。