spring-boot health not showing details (withDetail info)

According to spring-boot docs:

. . . by default, only the health status is exposed over an unauthenticated HTTP connection. If you are happy for complete health information to always be exposed you can set endpoints.health.sensitive to false.

Solution is to set endpoints.health.sensitive to false in application.properties.

application.properties

endpoints.health.sensitive=false

For >1.5.1 application.properties

management.security.enabled=false 

At Spring Boot 2.0.0.RELEASE (thx @rvit34 and @nisarg-panchal):

management:
  endpoint:
    health:
      show-details: "ALWAYS"
  endpoints:
    web:
      exposure:
        include: "*"

management.endpoints.web.exposure.include=* exposes all endpoints, if that is what you want.

Current documentation can be found here: https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-endpoints.html


Thanks @rvit34 and @Ninja Code Monkey its working.

For Springboot 2.x.x.RELEASE,

Use below for application.properties,

management.endpoint.health.show-details=ALWAYS

Use below for applicaton.yml,

management: endpoint: health: show-details: "ALWAYS"


Setting 'endpoints.health.sensitive' made no difference... had to set:

management:
    security:
        enabled: false

At Spring Boot 2.0.0.RELEASE:

management:
   endpoint:
      health:
        show-details: "ALWAYS"