依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
actuator插件提供的端点汇总
| 端点 | 描述 |
|---|---|
| autoconfig | 获取自动配置信息 |
| beans | 获取spring bean基本信息 |
| configprops | 配置项信息 |
| threaddump | 获取当前线程基本信息 |
| env | 获取环境变量信息 |
| health | 获取健康检查信息 |
| info | 获取应用基本信息 |
| metrics | 获取性能指标信息 |
| mappings | 获取请求映射信息 |
| trace | 获取请求调用信息 |
使用http://{{host}}:{{port}}/actuator/{{endpoints}}即可访问相应端点下的信息
修改actuator插件默认端点的配置
主要是 endpoints 属性
例:
添加 spring-boot-starter-hateoas 依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-hateoas</artifactId>
</dependency>
使用http://localhost:8762/actuator即可查看应用提供的端点列表,就不用记住有哪些端点










网友评论