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:
|Actuator adds /info endpoint by default. It contains commit, timestamp, information from the git.properties if it exists and any properties in the environment that has a prefix of info.
| 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.
|Will return a response of all the spring beans in Spring Context.
|Lists environment properties which includes spring profiles, commandline arguments, servletContextInitParams, systemProperties and system environment.
|Dumps detailed information about all threads in the application.
|Response returns a response that is compatible with [Graphite](http://graphite.wikidot.com/) 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.
|Returns an array with detailed response information.
|Exposes all elements that have been auto configured
|An endpoint that shuts down the
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.
Add application.properties - optional
If properties are defined, a node will appear in the /env url. So for instance, a properties file
will be outputted to /env
Next fire up your favorite server and access one of the urls above.