diff --git a/spring-boot/spring-boot-actuator/README.md b/spring-boot/spring-boot-actuator/README.md index 2217bd1..1f63071 100644 --- a/spring-boot/spring-boot-actuator/README.md +++ b/spring-boot/spring-boot-actuator/README.md @@ -161,8 +161,10 @@ management: 导入 Actuator 的 starter 并进行配置后,访问 http://127.0.0.1:8080/actuator/health 就可以看到对应的项目监控状态。
+ 健康指标 HealthIndicators 由 Spring Boot 自动配置,因此这里显示监控信息是由项目所使用的技术栈而决定的: + | 名称 | 描述 | | ------------------------------------------------------------ | -------------------------------- | | [CassandraHealthIndicator](https://github.com/spring-projects/spring-boot/tree/v2.0.1.RELEASE/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cassandra/CassandraHealthIndicator.java) | 检查 Cassandra 数据库是否启动。 | @@ -206,6 +208,7 @@ public class CustomHealthIndicator implements HealthIndicator { 自定义检查通过的情况下:
+ 自定义检查失败的情况:
@@ -239,6 +242,7 @@ public class CustomHealthAggregator implements HealthAggregator { 当我们自定义健康检查项不通过时候的结果如下:
+ 这里需要注意的是返回自定义的聚合状态时,状态码也变成了 503,这是我们在配置文件中进行定义的: ```properties