SpringBoot2.x Actuator监控端点使用

2020-07-27  本文已影响0人  砒霜拌辣椒

2.x版本的actuator使用与1.x版本有较大区别,主要有如下规则:

端点配置

management:
  endpoint.shutdown.enabled: true # 开启shutdown
  endpoints.web.exposure.include: "*" # 暴露所有端点
  endpoint.health.show-details: always # health健康检查显示详细信息
#  endpoints.web.base-path: /monitor # 监控端点url设置(默认是/actuator,2.0之前是/)
#  server.port: 30101 # 监控端点单独配置(默认就是服务端口)

常用端点可以参考SpringBoot1.x版本。

SpringBoot1.x Actuator监控端点使用

参考链接

代码地址

上一篇 下一篇

猜你喜欢

热点阅读