SpringBoot系列三十二:整合Actuator

 使用Spring Boot为我们提供的准 生产环境下的应用监控和管理功能。我们可以通过HTTP,JMX,SSH协议来进 行操作,自动得到审计、健康及指标信息等。

监控和管理端点:
在这里插入图片描述
定制端点信息:
 1、定制端点一般通过endpoints+端点名+属性名来设置。
 2、修改端点id(endpoints.beans.id=mybeans)
 3、开启远程应用关闭功能(endpoints.shutdown.enabled=true)
 4、关闭端点(endpoints.beans.enabled=false)
 5、开启所需端点:
  endpoints.enabled=false
  endpoints.beans.enabled=true
 6、定制端点访问根路径:
  management.context-path=/manage
 7、关闭http端点:
  management.port=-1

使用:
引入依赖

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

application.properties配置

management.security.enabled=false
info.app.id=hello
info.app.version=1.0.0
management.context-path=/manage
management.port=8181

git.properties

git.branch=develop
git.commit.id=xjkd33s
git.commit.time=2019-03-03 13:03:59

访问:http://localhost:8181/manage/info
在这里插入图片描述

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值