Spring Boot 2.0 Not Registering Custom Actuator Endpoint

前端 未结 3 825
梦如初夏
梦如初夏 2021-01-20 06:15

I\'ve recently upgraded a project from Spring Boot 1.5.1 to 2.0.0 and our custom actuator endpoint is not getting registered. I\'ve tried the following endpoint migration gu

3条回答
  •  自闭症患者
    2021-01-20 06:57

    I believe, the answer by Sharan De Silva is not correct. I just spent several hours on a identical issue, because the property name is different. Should be:

    management:
      endpoints:
        web:
          exposure:
            include: 'health,info,metrics,customendpoint'
    

    Here's the official reference: https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-endpoints.html#production-ready-endpoints-exposing-endpoints

提交回复
热议问题