Spring Boot Actuator监控关闭

时间:2025-04-01 16:39:15

可以使用如下属性:-by-default=false

* 在YAML中有特殊的含义,所以如果想使用include或者exclude包含所有的端点时要加上引号,如下示例:

# 暴露监控端点
management:
  endpoints:
    enabled-by-default: false #关闭监控
    web:
      exposure:
        include: '*'