Spring Boot Actuator without Spring Boot

Tags: , , ,

I’ve been working on a Spring/Spring MVC application and I’m looking to add performance metrics. I’ve come across Spring Boot Actuator and it looks like a great solution. However my application is not a Spring Boot application. My application is running in a traditional container Tomcat 8.

I added the following dependencies

// Spring Actuator
compile "org.springframework.boot:spring-boot-starter-actuator:1.2.3.RELEASE"

I created the following config class.

@Profile(value = {"dev", "test"})
public class SpringActuatorConfig {


I even went as far as adding @EnableConfigurationProperties on every configuration class as suggested on another post on StackOverflow. However that didn’t do anything. The endpoints are still not being created and return 404s.


You can use actuator without spring boot. Add this to pom.xml



And then in your config class

        EndpointAutoConfiguration.class , PublicMetricsAutoConfiguration.class , HealthIndicatorAutoConfiguration.class
public class MyActuatorConfig {

    public EndpointHandlerMapping endpointHandlerMapping(Collection<? extends MvcEndpoint> endpoints) {
        return new EndpointHandlerMapping(endpoints);

    public EndpointMvcAdapter metricsEndPoint(MetricsEndpoint delegate) {
        return new EndpointMvcAdapter(delegate);

And then you can see the metrics in your application


Actutaor end point

Source: stackoverflow