Actuator in a non-boot application

At SpringOne 2GX 2013 Spring Boot was released which contains a module Spring Boot - Actuator which provides a series of endpoints to help manage your spring application. At a thousand foot level it reads properties and spring beans then returns a JSON view. It allows direct access to non functional application information without having to open an IDE or a command prompt. A few endpoints it provides out of the box:

/infoActuator adds /info endpoint by default. It contains commit, timestamp, information from the if it exists and any properties in the environment that has a prefix of info.
/health Indicates if the application is healthy or not by returning a an empty response with a status of 200. To customize the response simply add a bean of type HealthIndicator to your application context.
/beansWill return a response of all the spring beans in Spring Context.
/envLists environment properties which includes spring profiles, commandline arguments, servletContextInitParams, systemProperties and system environment.
/dumpDumps detailed information about all threads in the application.
/metricsResponse returns a response that is compatible with [Graphite]( that contains metrics about the application. Attributes include how much memory is free and available, the number of processors, the average number of milliseconds each different type of request has taken since the start of the app, etc.
/traceReturns an array with detailed response information.
/autoconfigurationreportExposes all elements that have been auto configured
/shutdownAn endpoint that shuts down the ApplicationContext

Since the module is under the spring boot umbrella one might assume that actuator itself cannot be used w/ out boot. Since actuator is just a series of spring beans under the covers there is no reason why you can't integrate in a non-boot app. Here is a few steps on how to integrate actuator into your existing spring applications.

Add spring-boot-actuator as a maven dependency


Create a configuration class

It will look a bit different depending on if you are using Java Config or standard xml configuration.


public class SpringBootActuatorConfig {

    public EndpointHandlerMapping endpointHandlerMapping() {
        return new EndpointHandlerMapping();

    public EndpointHandlerAdapter endpointHandlerAdapter() {
        return new EndpointHandlerAdapter();

XML config

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""

    <bean name="endpointHandlerAdapter" class="org.springframework.boot.actuate.endpoint.mvc.EndpointHandlerAdapter" />
    <bean name="endpointHandlerMapping" class="org.springframework.boot.actuate.endpoint.mvc.EndpointHandlerMapping" />
    <bean class="org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration$InfoPropertiesConfiguration" />
    <bean name="beansEndpoint" class="org.springframework.boot.actuate.endpoint.BeansEndpoint" />

        <context:annotation-config />
        <bean name="endpointAutoConfiguration" class="org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration"/>

Add - optional

If properties are defined, a node will appear in the /env url. So for instance, a properties file

will be outputted to /env

class path resource [com/levelup/properties/]: { "", ""

Next fire up your favorite server and access one of the urls above.