springBoot2.0的actuator配置

本文介绍了在SpringBoot 2.0中如何配置Actuator以暴露所有端点,通过配置后,系统成功显示了所有可用的断点信息,增强了应用的监控和管理能力。
摘要由CSDN通过智能技术生成

springboot2.0版本默认不会将所有断点暴露,需要以下配置:

#actuator端口
management.server.port=8310
 
#修改访问路径,2.0之前默认是/,2.0默认是/actuator
management.endpoints.web.base-path=/actuator
 
#开放所有页面节点 ,默认只开启了health、info两个节点
management.endpoints.web.exposure.include=*
 
#显示健康具体信息,默认不会显示详细信息  

management.endpoint.health.show-details=always

配置后日志信息如下:

Exposing 14 endpoint(s) beneath base path '/actuator'
Mapped "{[/actuator/auditevents],methods=[GET]
Mapped "{[/actuator/beans],methods=[GET]
Mapped "{[/actuator/health],methods=[GET]
Mapped "{[/actuator/conditions],methods=[GET]
Mapped "{[/actuator/configprops],methods=[GET]
Mapped "{[/actuator/env],methods=[GET]
Mapped "{[/actuator/env/{toMatch}],methods=[GET]
Mapped "{[/actuator/info],methods=[GET]
Mapped "{[/actuator/loggers],methods=[GET]
Mapped "
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值