management:
endpoints:
enabled-by-default: false #关闭所有默认端点==关闭所有端点(开启时默认开放info和health)
endpoint:
# 开启你想开放的端点
info:
enabled:true #开启info端点
其他相关配置说明
Spring Boot 2.X 中,Actuator 默认开放 health 和 info 两个端点,如果需要配置开放所有端点(配置值为 "*" 代表所有)
management:
endpoints:
enabled-by-default: true #不配时默认为true
web:
exposure:
include: "*" #开启全部监控端点
base-path: / #自定义监控根路径(/actuator 改为/,此配置只用于更改/actuator这个path节点 )
endpoint:
health:
show-details: always #health端点显示具体信息
info:
enabled:true