To enable Spring Boot Actuator in your application, you will have to add Spring Boot Actuator dependency in your package manager. This is the simplest way to enable the production-ready features in your Spring application, by adding a Starter dependency, spring-boot-starter-actuator.
Let's add the Actuator to a Maven-based project as follows in your Spring Boot project:
<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> </dependencies>
The preceding Maven script will enable the production-ready features that are Spring Boot's Actuator. Now let's see how to enable the Actuator with a Gradle-based project.
Let's use the following declaration:
dependencies { compile("org.springframework.boot:spring-boot-starter-actuator") }
The preceding "Gradle script will enable the production-ready features in your Spring application.
After enabling the production-ready features, let's see what all the endpoints are that Spring Boot's Actuator provides.