1. The purpose of this post
By default, spring boot 1.x and 2.x apps only enable info and health endpoint of actuator, sometimes, we want to enable all
endpoints temporarily. It’s easy, let’s do it.
- SpringBoot 1.x and 2.x
- Java 1.8+
3. The solution
3.1 Add actuator dependency your POM.xml
If springboot find the tomcat connection pool jar file in the classpath, then it would use it as the default connection pool. We must remove it.
Run your springboot app, and visit http://localhost:8080/actuator/metrics, you would get this:
3.2 Change your application.properties like this
In order to access all endpoints of spring boot actuator, you should add this property to your application.properties:
It means that include everything.
3.3 Rerun the code
When visit http://localhost:8080/actuator/metrics we should get this:
As you can see, enabling all endpoints of spring boot 1.x and 2.x applications is very easy.