Spring Boot 2.0官方文档之 Actuator


业务需要,随来学习springboot的actuator,以下是看到的几篇好的博文,多谢分享。

基本配置:

在application.properties文件中加上:

# actuator config
management.endpoints.web.base-path=/myactuator
management.endpoints.web.exposure.include=*

springboot 2.x中,默认的Actuator的访问路径从1.x的"/"变成了“/actuator”了,

可以用management.endpoints.web.base-path  修改访问路径。

management.endpoints.web.exposure.include=*  暴露所有页面端点,默认只暴露了health、info两个端点。

你也可以修改actuator访问的端口号,默认的是springboot配置的端口号:

management.server.port=18080


如何使用:

localhost:18080/myactuator/health

localhost:18080/myactuator

localhost:18080/myactuator/beans

以下是几篇介绍比较完整的博文,感谢分享。

actuator的介绍和使用:

https://blog.csdn.net/alinyua/article/details/80009435

使用actuator监控:

https://blog.csdn.net/qq_36666651/article/details/80696810

https://blog.csdn.net/myherux/article/details/80670557

https://blog.csdn.net/MyHerux/article/details/80667524

官方文档:

https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值