Springboot三板斧
1、加依赖

2、写注解

3、写配置

Spring Boot Actuator
Spring Boot Actuator 是 Spring Boot 提供的一系列用于监控和管理应用程序的工具和服务。
SpringBoot导航端点

其中localhost:8080/actuator/health是健康检查端点,加上以下配置:

访问显示结果:status=UP表示健康,total总磁盘量,free剩余,free剩余低于threshold就预示是不健康的

Actuator health状态

其中localhost:8080/actuator/info,是Actuator描述型端点,加配置,访问可以查到配置信息


Actuator只有Health、info是默认暴露的端点,Actuator其他端点需要配置才能暴露出来

所有端点都可以看到了

太多了,选择性激活,在配置里配上就行
