SpringBoot升级后,SBA UI中不再显示运行状况详细信息



我将我的应用程序从SpringBoot 2.1.18升级到了SpringBoot 2.5.7,我发现升级后,诸如diskSpace之类的运行状况详细信息不再显示在SpringBootAdmin UI中。我使用的是SBA 2.0.0,并且没有改变。

运行状况端点仍然包括它们,但顶级密钥已从details重命名为components。我以为这就是SBA困惑的地方,但更奇怪的是,尽管如此,我的自定义健康指标仍然显示在SBA中。

知道我该怎么解决这个问题吗?

{
"status": "OUT_OF_SERVICE",
"details": {
"myCustomHealthIndicator": {
"status": "OUT_OF_SERVICE",
"details": {
"Reason": "Suspect State message received",
"StateText": "Connection failed; Channel disconnected"
}
},
"diskSpace": {
"status": "UP",
"details": {
"total": 107361579008,
"free": 94436716544,
"threshold": 10485760
}
},
"refreshScope": {
"status": "UP"
}
}
}

{
"status": "OUT_OF_SERVICE",
"components": {
"diskSpace": {
"status": "UP",
"details": {
"total": 107361579008,
"free": 100102447104,
"threshold": 10485760,
"exists": true
}
},
"livenessState": {
"status": "UP"
},
"ping": {
"status": "UP"
},
"readinessState": {
"status": "UP"
},
"myCustomHealthIndicator": {
"status": "OUT_OF_SERVICE",
"details": {
"Reason": "Suspect State message received",
"StateText": "Connection failed; Channel disconnected"
}
}
},
"groups": [
"liveness",
"readiness"
]
}

通过升级到Spring Boot Admin Server 2.5.4(de.codecentric:spring-boot-admin-starter-server:jar:2.5.4(解决

最新更新