业务需要,随来学习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/