在新的Spring Boot从1.5x升级到2.x之后,我无法检查服务的运行状况。我试图调用引发错误的/ health端点,然后查看一些春季启动文章,其中说我需要调用/ actuator / health,然后显示
{"status":"UP"}
我添加了此属性"management.endpoint.health.show-details=ALWAYS"
,然后显示了类似的内容。
{"status":"UNKNOWN","details":{"binders":{"status":"UNKNOWN","details":{"consul":{"status":"UNKNOWN"}}},"diskSpace":{"status":"UP","details":{"total":254447448064,"free":149837242368,"threshold":10485760}},"db":{"status":"UP","details":"database":"Oracle","hello":"Hello"}},"refreshScope":{"status":"UP"},"discoveryComposite":{"status":"UNKNOWN","details":{"discoveryClient":{"status":"UP","details":{"services":[]}}}},"clientConfigServer":{"status":"UP","details":{"propertySources":[]}},"hystrix":{"status":"UP"}}}
有人可以让我知道,需要添加哪些属性来查看状态,而不是“未知”。预先感谢。