spring boot actuator服务监控与管理

1.引入actuator所需要的jar包

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

2.添加actuator所需要的配置(注意:如果使用properties文件management.endpoints.web.exposure.include=*,此处不能加引号)

management:
  endpoints:
    web:
      exposure:
        #加载所有的断点 默认只加载了info,health
        include: '*'
  endpoint:
    health:
      show-details: always
    shutdown:
      enabled: false

3.可通过访问以下连接进行测试

 http://localhost:8080/actuator/health

4.更多详细配置可查看

https://blog.csdn.net/alinyua/article/details/80009435

猜你喜欢

转载自www.cnblogs.com/gyli20170901/p/10044883.html