开启监控
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
默认端点
Spring Boot 2.0 的Actuator只暴露了health和info端点,提供的监控信息无法满足我们的需求
在1.x中有n多可供我们监控的节点,官方的回答是为了安全….
开启所有端点
在application.yml中加入如下配置信息
*代表所有节点都加载
management:
endpoints:
web:
exposure:
include:
- "*"
Health
会显示系统状态
{"status":"UP"}
shutdown
用来关闭节点
开启远程关闭功能
management:
endpoint:
shutdown:
enabled: true
使用Post方式请求端点
{
"message": "Shutting down, bye..."
}
autoconfig
获取应用的自动化配置报告
beans</