The Actuator's endpoints provide many insights into your Spring application to callers, but some of that information might be unsafe if you expose it to the caller. For example, the /shutdown endpoint can kill your application in production. So the /shutdown endpoint can be very dangerous for your application if you expose it publicly. Similarly, many endpoints in Spring Boot's Actuator expose information that might be very sensitive. So, you have to secure those Actuator endpoints and make them only available to authorized callers. You can use Spring Security to make secure the Actuator endpoints.
Although Spring Boot will not apply any security on your behalf, it does provide some convenient RequestMatchers that can be used in combination with Spring Security. In a Spring Boot application, this means adding the Security Starter as a...