我在 Spring 执行器中启用了 DataSourceHealthIndicator,现在在我得到的“健康”端点中:
{
"status":"UP",
"details":{
"db":{
"status":"UP",
"details":{
"database":"H2",
"hello":1
}
},
"diskSpace":{
"status":"UP",
"details":{
"total":999528853504,
"free":773661831168,
"threshold":10485760
}
}
}
}
我想知道数据库信息中的 "hello":1 是什么意思
最佳答案
这意味着数据库健康检查。
假的定期查询(例如 Oracle 中的 select 'hello' from Dual
)检查数据库是否仍可从应用程序中使用。在执行器中 "hello":1
表示上次健康检查成功。
参见https://cloud.ibm.com/docs/java?topic=java-spring-healthcheck
关于java - 数据库运行状况指示器中的 "hello"属性是什么意思? ( Spring 致动器),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58219704/