Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Actuator Exposing Endpoints not working

I am using spring boot 2.0.4 and want to expose my actuator endpoints. When adding the following to application.yml only info, health are being exposed.

management:
  endpoints:
    web:
      exposure:
        include: "*"

When I run http://localhost:8080/actuator I get

{"_links":{"self":{"href":"http://localhost:8080/actuator","templated":false},"health":{"href":"http://localhost:8080/actuator/health","templated":false},"info":{"href":"http://localhost:8080/actuator/info","templated":false}}}
like image 390
Ronny Shibley Avatar asked Sep 06 '25 03:09

Ronny Shibley


1 Answers

Spring Boot 2.0 takes a slightly different approach to ensure web endpoints security. The majority of Web endpoints are now disabled by default (Only the /health and /info endpoints are exposed) and the management.security.enabled property has been removed. There is no longer a separate security auto-configuration for the Actuator, individual endpoints may be enabled/disabled and/or exposed via configuration in the application.properties file. For example:

# disable beans endpoint  
management.endpoints.beans.enabled=false  
# expose all endpoints:
management.endpoints.web.exposure.include=*  

See additional info Spring official documentation: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide#endpoints

like image 87
CRISTIAN ROMERO MATESANZ Avatar answered Sep 11 '25 06:09

CRISTIAN ROMERO MATESANZ