###
#1、Endpoints是Spring Boot Actuator提供的一组用于监控和管理应用程序的RESTful接口
#2、Endpoint是Endpoints的具体实现类
#3、Endpoints与Endpoint,有一个禁用,则结果是禁用
###
management:
health:
db:
enabled: true #配置health端点中,是否检测、展示db存活
endpoints:
#是否暴露endpoint,相当于总开关,默认为true
enabled-by-default: true
web:
#默认访问路径
base-path: /myActuator
#暴露哪些web endpoint,默认为health、info
exposure:
include: '*' #配置暴露所有端点
#include: 'health,info,env' #配置暴露health,info,env这3个端点
#exclude: "beans,heapdump,shutdown" #配置不暴露beans,heapdump,shutdown这3个端点
#关闭所有端点之后,可以指定暴露某个端点
#endpoints配置暴露所有端点后,endpoint再配置,结果是打开
endpoint:
info:
enabled: true
heapdump:
enabled: true #Endpoints与Endpoint,有一个禁用,则结果是禁用
health:
show-details: never #配置是否展示health详细信息
springboot actuator配置
最新推荐文章于 2024-01-20 12:22:46 发布