Spring Boot : Actuator

Use for monitor and manage running application.

Enable by adding dependency below.

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

Using HTTP endpoint

  • /actuator/health
    • Return status of running application
  • /actuator/info
    • Usually return blank but we can customize it in application.properties.
    • @project.version@ refer to version tag in pom.xml
info.app.version=@project.version@
info.app.name=Hello World

Using JMX

  • This option is disable by default but we can enable by set spring.jmx.enabled to true
  • Data will be exposed under org.springframework.boot domain.

原文链接:Spring Boot : Actuator

© 版权声明
THE END
喜欢就支持一下吧
点赞7 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容