springboot2.0的actuator组件,健康检查

版权声明:原创文章转载请注明出处,谢谢。 https://blog.csdn.net/hexiaohua95/article/details/88665675

本文之说如何在项目中配置,当作一个demo,让你看到actuator的效果,不深入。

导入依赖

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

在application.ym文件中配置启用所有的监控端点,默认情况下,这些端点是禁用的。

management:
  endpoints:
    web:
      exposure:
        include: "*"

然后通过地址访问/actuator,如下图

猜你喜欢

转载自blog.csdn.net/hexiaohua95/article/details/88665675