Spring Boot : Actuator

mackittipat

Mac

Posted on April 26, 2020

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.
πŸ’– πŸ’ͺ πŸ™… 🚩
mackittipat
Mac

Posted on April 26, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related