1.使用 Actuator 检查与监控
step 1 创建项目
step 2 坐标依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
step 3修改配置文件
#配置访问端点的根路径
management.endpoints.web.base-path=/actuator
#配置开启其他端点的 URI
#开启所有的端点访问:*
#指定开启端点访问:如:beans,env
management.endpoints.web.exposure.include=*
step 4 各项监控指标接口 URL 介绍
应用配置
度量指标,变化的:线程个数,线程名称优先级,内存使用大小
运行结果: