Practical coding guides

Spring Boot Actuator

Spring Boot Actuator is a library providing built-in APIs (such as health check) to help you monitor and manage Spring Boot applications on production environment through HTTP endpoints and JMX

Lets walk through this tutorial to explore in more details

Add Spring Boot Actuator to your project

You can add Spring Boot Actuator into your project as a dependency on pom.xml or build.gradle file. The library versions can be omitted as Spring Boot can help you to resolve

On pom.xml file


On build.gradle file

dependencies {

spring-boot-starter-web should be included if you’d like to use the HTTP endpoints

Actuator APIs and endpoints

Actuator exposes its APIs through endpoints with prefix as /actuator by default. You can see and use it immediately after including the dependency into your project

Lets start the application on your local and access to http://localhost:8080/actuator, you would see the currently available APIs

Spring Boot Actuator

These default enabled APIs can be controlled via below properties

management.endpoints.web.exposure.include=info, health

Beside info and health, Actuator also provide other APIs such as

  • loggers for retrieving and modifying loggers configuration
  • metrics for retrieving all available metrics information
  • prometheus for exposing metrics to be scrapped by a Prometheus server
  • flyway and liquibase for retrieving database migration history if you’re using Flyway or Liquibase

To discover all the available APIs, inside your application.properties file, update management.endpoints.web.exposure.include=* and refresh http://localhost:8080/actuator

Modify endpoints

You can use another prefix instead of /actuator for the Actuator APIs, by updating property as the following


Endpoint of each API can also be modified by updating respective property. The following updates the health check endpoint to healthcheck instead of health by default



In this tutorial, we learned using Spring Boot Actuator APIs to provide monitoring APIs to applications on the production environment. You can explore more about it at here

Follow HelloKoding