springboot--2.1.0.RELEASE 版本 中使用actuator监控

在项目中添加依赖

org.springframework.boot

spring-boot-starter-actuator

 

然后需要在配置文件中添加配置

management.endpoints.web.exposure.include=*

不加的话可以访问几个默认的,比如health等等

然后访问端口号并加上/actuator才能访问相应的端点

比如 程序 的端口号为2201 现在想看/beans 的监控

访问地址为127.0.0.1:2201/actuator/beans 才可以,以此类推

你可能感兴趣的:(springboot--2.1.0.RELEASE 版本 中使用actuator监控)