- The first thing that we need to do is add a dependency to the Spring Boot Actuator starter in our build.gradle file with the following content:
dependencies { ... compile("org.springframework.boot:spring-boot-starter- data-rest") // compile("org.springframework.boot:spring-boot-starter- jetty") // Need to use Jetty instead of Tomcat compile("org.springframework.boot:spring-boot-starter- actuator") compile project(':db-count-starter') ... }
- Adding this dependency alone already gives us the ability to access the Spring management /actuator/* endpoints, such as /env, /info, /metrics, and /health, (though they are disabled by default, unless a management.endpoints.web.exposure.include=* property is configured in the application.properties ...