Spring Boot之Actuator的端点
Spring Boot Actuator的关键特性是在应用程序里提供众多Web端点,通过它们了解应用程序 运行时的内部状况。有了Actuator,你可以知道Bean在Spring应用程序上下文里是如何组装在一起的,掌握应用程序可以获取的环境属性信息,获取运行时度量信息的快照……
Actuator提供13个端点,可以分为三大类:配置端点、度量端点和其他端点。具体如下表所示:
| Http方法 | 路径 | 描述 |
|---|---|---|
| get | /autoconfig | 提供了一份自动配置报告,记录哪些自动配置条件通过了,哪些没通过 |
| get | /configprops | 描述配置属性(包含默认值)如何注入Bean |
| get | /beans | 描述应用程序上下文里全部的Bean,以及它们的关系 |
| get | /dump | 获取线程活动的快照 |
| get | /env | 获取全部环境属性 |
| get | /env/{name} | 根据名称获取特定的环境属性值 |
| get | /health | 报告应用程序的健康指标,这些值由 HealthIndicator 的实现类提供 |
| get | /info | 获取应用程序的定制信息,这些信息由 info 打头的属性提供 |
| get | /mappings | 描述全部的URI路径,以及它们和控制器(包含Actuator端点)的映射关系 |
| get | /metrics | 报告各种应用程序度量信息,比如内存用量和HTTP请求计数 |
| get | /metrics/{name} | 报告指定名称的应用程序度量值 |
| post | /shutdown | 关闭应用程序,要求 endpoints.shutdown.enabled 设置为 true |
| get | /trace | 提供基本的HTTP请求跟踪信息(时间戳、HTTP头等) |
要启用Actuator的端点,只需在项目中引入Actuator的起步依赖即可。
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
亦或你使用Spring Boot CLI,可以使用如下 @Grab 注解:
@Grab('spring-boot-starter-actuator')
注:springboot2.0.1版本中除了health和info其他端点默认都被禁用了,想要打开,需要在配置文件加上:
management.endpoints.web.exposure.include=*
Spring Boot之Actuator的端点的更多相关文章
- Spring Boot整合actuator实现监控管理
Spring Boot使用actuator监控管理 1.在pom文件中导入相关的依赖 <dependency> <groupId>org.springframework.boo ...
- Spring Boot (28) actuator与spring-boot-admin
在上一篇中,通过restful api的方式查看信息过于繁琐,也不直观,效率低下.当服务过多的时候看起来就过于麻烦,每个服务都需要调用不同的接口来查看监控信息. SBA SBA全称spring boo ...
- Spring Boot (27) actuator服务监控与管理
actuaotr是spring boot项目中非常强大的一个功能,有助于对应用程序进行监控和管理,通过restful api请求来监管.审计.收集应用的运行情况,针对微服务而言它是必不可少的一个环节. ...
- spring boot之actuator简介
当我们的开发工作进入尾声,部署上线之后,对于一个程序而言,可能才刚刚开始,对程序的运行情况的监控要伴随着整个生命周期. 如果这个工作由程序员自己来开发,也未尝不可,但本着不重复制造轮子的思想,我们尽量 ...
- Spring Boot|监控-Actuator
Spring Boot 为我们提供了一个生产级特性-Actuator,包含很多实际有用的API,下面我们就一起来看看这些API. 一.Actuator 首先在程序中引入Actuator <!-- ...
- 第11章 Spring Boot使用Actuator
在生产环境中,需要实时或定期监控服务的可用性,spring-Boot的Actuator 功能提供了很多监控所需的接口. Actuator是Spring Boot提供的对应用系统的自省和监控的集成功能, ...
- 从Unauthorized 401错误学习Spring Boot的Actuator
之前用Spring Boot都是别人搭好的框架,然后自己在里面写就行了.对原理.细节上都怎么涉及,毕竟需求都做不完.但是昨天一个访问RESTful接口的401问题搞了我2个小时.网上找的很多用: ma ...
- spring boot的actuator
actuator官方的介绍 Spring Boot includes a number of additional features to help you monitor and manage yo ...
- spring boot监控--actuator
原文地址:http://blog.csdn.net/wh_ouyangshuang/article/details/48048111 spring-boot-actuator模块提供了一个监控和管理生 ...
随机推荐
- Java实现多文件压缩打包的方法
package com.biao.test; import java.io.File; import java.io.FileInputStream; import java.io.FileOutpu ...
- PDW中的Split Querying Process
最近看了关于 SQL Server 的分布式处理方面的论文,觉得它提出的 Polybase 跟之前看过的 HadoopDB 有些神似,这里做个小总结(抽空再把 HadoopDB 的总结贴出来). 不算 ...
- POJ3280 Cheapest Palindrome 【DP】
Cheapest Palindrome Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 6013 Accepted: 29 ...
- BCGControlBar介绍
第一次翻译有诸多不正确的地方,还忘各位指正,谢谢! 英文原文:http://www.bcgsoft.com/bcgcontrolbarpro.htm BCGControlBar是MFC的一个扩展库其英 ...
- 在sql语句中 inner join ,left join,right join 和on 以及where
当使用几种join的时候,on是指表连接起来基于的条件,where是对连接的表进行过滤的条件. where 1=1 当我们需要拼接字符串的时候 在基础sql字符串中写上where 1=1 可以不需要 ...
- Multi-tasking RTOS for microprocessors with limited memory by saving only a single return address per task during context switching
A real-time operating system (RTOS) for use with minimal-memory controllers has a kernel for managin ...
- OpenGL(二十一) glPolygonOffset设置深度偏移解决z-fighting闪烁问题
开启深度测试后OpenGL就不会再去绘制模型被遮挡的部分,这样实现的显示画面更为真实,但是由于深度缓冲区精度的限制,对于深度相差非常小的情况(例如在同一平面上进行两次绘制),OpenGL就不能正确判定 ...
- SecureCRT循环检查设备状态
1: #$language = "VBScript" 2: #$interface = "1.0" 3: 4: ' This automatically gen ...
- WPF范围选择控件(RangeSelector)
原文:WPF范围选择控件(RangeSelector) 版权声明:本文为博主原创文章,转载请注明作者和出处 https://blog.csdn.net/ZZZWWWPPP11199988899/art ...
- BIOS 选项设置的含义
SATA Mode Section: ADHI: Advanced Host Controller Interface - this is a hardware mechanism that allo ...