springboot监控之监控管理

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

启动服务器:并访问

扫描二维码关注公众号,回复: 9117992 查看本文章

猜你喜欢

转载自www.cnblogs.com/xiximayou/p/12303251.html