所謂健康檢查是有很多檢查項(xiàng)的,springboot中繼承AbstractHealthIndicator的類,比如DataSourceHealthIndicator RedisHealthIndicator 等,springboot會(huì)自動(dòng)配置,比如使用了mysql的datasouce,健康檢查的時(shí)候就會(huì)執(zhí)行DataSourceHealthIndicator 的doHealthCheck(),使用了redis,就會(huì)執(zhí)行RedisHealthIndicator 的doHealthCheck()。
www.dbjr.com.cn/article/2179...htm 2025-5-30