'Remove Spring actuator from my project
I have a Spring boot project using spring security and Oauth2 and I'm noticing some bad behaviour which could be caused by actuator. To be sure I want to remove it from the project but I can't find it explicitly mentionned in my Maven dependencies.
Any idea on how to do it?
Solution 1:[1]
It is not quite clear to me whether you want to exclude the actuator dependencies from your classpath or whether you want to disable the behaviour from your container. If it is the latter, you should be able to do so through your application.properties, i.e.:
management.endpoints.enabled-by-default=false
I am pretty sure you can disable also by using annotations on your spring boot application class as an alternative.
Solution 2:[2]
Use mvn dependency:tree to print all the transitive dependencies as a tree structure. It's a standard maven-dependency-plugin mojo.
Once you find the dependency that introduces it use <dependencyManagement> section with correct <exclude> to remove the actuator from the project.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Kristoffer |
| Solution 2 |
