码迷,mamicode.com
首页 > 编程语言 > 详细

springboot监控之监控管理

时间:2020-02-13 14:57:26      阅读:66      评论:0      收藏:0      [点我收藏+]

标签:pat   idt   point   branch   int   git   prope   alt   tail   

1、新建一个springboot项目,选中web、DevTools、Actuator

2、在application.properties里面配置

#actuator端口 
management.server.port=9001
#修改访问路径  2.0之前默认是/   2.0默认是 /actuator  可以通过这个属性值修改  
management.endpoints.web.base-path=/monitor
#开放所有页面节点  默认只开启了health、info两个节点
management.endpoints.web.exposure.include=*
#显示健康具体信息  默认不会显示详细信息  
management.endpoint.health.show-details=always

3、启动服务器,之后输入:localhost:9001/monitor/health

技术图片

 

4、相关端点

技术图片

 

 5、测试

在appllication.properties同位置下新建git.properties:

git.branch=master
git.commit.id=123
git.commit.time=2019-02-10 12:12:56

启动服务器:并访问

技术图片

springboot监控之监控管理

标签:pat   idt   point   branch   int   git   prope   alt   tail   

原文地址:https://www.cnblogs.com/xiximayou/p/12303251.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!