Skip to content
Advertisement

Spring Boot Actuator without Spring Boot

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

JavaScript

I created the following config class.

JavaScript

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.

Advertisement

Answer

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

JavaScript

And then in your config class

JavaScript

And then you can see the metrics in your application

http://localhost:8085/metrics

Actutaor end point

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement