Spring Boot Actuator that includes additional features to help you monitor and manage your application in production. You can monitor your application’s auditing, health, and metrics by using HTTP endpoints or with JMX.

Spring Boot Actuator includes a number of built-in endpoints and lets you add your own. For example, the health endpoint provides basic application health information.


Spring Boot provides built-in endpoints as well as lets you add your own. You can check a list of endpoints at

Enabling Endpoints

By default all end points except for shutdown are enabled. You can enable a particular endpoint using management.endpoint..enabled property in your properties file. For example, if you want to enable the shutdown endpoint then you can use management.endpoint.shutdown.enabled=true.

If you want to disable all default endpoints then you can use management.endpoints.enabled-by-default=false and you can enable individual endpoint as per your requirements.

Endpoints – to expose or not

Since Endpoints may contain sensitive information, careful consideration should be given about when to expose them. The default exposure for the built-in endpoints can be found at

Now we will see how to work with Spring Boot Actuator by creating examples.


Knowledge on Spring Boot, web starter and actuator starter dependencies

Java 8, Eclipse IDE

Creating Gradle Project

Project Structure

Create gradle based project in Eclipse IDE.

spring boot actuator

Gradle build file

Once your project creation is done then update the build.gradle script with the following code:

buildscript {
	ext {
		springBootVersion = '2.1.3.RELEASE'
    repositories {
    dependencies {
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
dependencies {

In the above build script we have added the required dependencies – web and actuator starters.

Creating Main Class

Create below main class to start up the Spring Boot application.

package com.roytuts.springboot.actuator.main;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
public class ActuatorApplication {
	public static void main(String[] args) {, args);

Testing the Application

Run the above main class that will deploy the application and start the server at default Tomcat server’s port 8080.

Now when you hit the URL http://localhost:8080/actuator/health, then you will see the following output on the browser:

spring boot actuator - production ready features

By default, the health endpoint is mapped to /actuator/health, where /actuator is prefix.

From the output it is obvious that the application is up and running.

If you hit /actuator/info that displays arbitrary application’s info but here it won’t show anything here:

spring boot actuator

Now if you add below information into file: Boot Actuator Example Boot

Hit the same URL in the browser, you will see below output on the browser:

spring boot actuator

Discovery Page

A “discovery page” is added with links to all the endpoints. The “discovery page” is available on /actuator by default. This endpoint shows you all endpoint links for your Spring Boot application.

So you will get the below output for our application:

spring boot actuator

Customizing Base Path of Endpoints

By default the base path of the Actuator is /actuator but you can change it to other. For example, if you want to point Actuator’s base path to /management then you can add below into file.


Now you can access URL as http://localhost:8080/management/info.

Exposing Other Endpoints

By default for security reasons only /info and /health endpoints are enabled over HTTP. If you want to expose other endpoints then you can add below properties to file.

If you want to expose all endpoints then add:


Now you would be able to access all endpoints over HTTP.

If you want specific endpoints to be enabled then you can add specific endpoints:


Now you would be able to access above endpoints over HTTP.

Source Code Download

Thanks for reading.


Leave a Reply

Your email address will not be published. Required fields are marked *