步骤:

1:引入spring-boot-starter-actuator,可以使用Spring Boot为我们提供的准生产环境下的应用监控和管理功能

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

 

2:在配置文件中开放所有的web endpoints

#开放所有的web endpoints
management.endpoints.web.exposure.include= *

3:访问http://localhost:8080/actuator 可以查看到所有的监控节点的访问路径

4:监控和管理端点的描述

 

 

 

posted on 2019-09-11 16:55  lykan2lykan  阅读(362)  评论(0)    收藏  举报