springboot集成actuator

pom.xml中引入actuator. 

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

yaml中开启端点.

management:
  endpoints:
    enabled-by-default: true  # 暴露端点所有新
    web:
      exposure:
        include: '*'  # 以web方式暴露

这样就可以在浏览器访问actuator

猜你喜欢

转载自blog.csdn.net/m0_37564426/article/details/113060947