依賴
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
actuator插件提供的端點匯總
端點 | 描述 |
---|---|
autoconfig | 獲取自動配置信息 |
beans | 獲取spring bean基本信息 |
configprops | 配置項信息 |
threaddump | 獲取當前線程基本信息 |
env | 獲取環(huán)境變量信息 |
health | 獲取健康檢查信息 |
info | 獲取應用基本信息 |
metrics | 獲取性能指標信息 |
mappings | 獲取請求映射信息 |
trace | 獲取請求調(diào)用信息 |
使用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即可查看應用提供的端點列表,就不用記住有哪些端點