當前位置:
首頁 >
前端技术
> javascript
>内容正文
javascript
SpringBoot 2.x 监控中心:Actuator
生活随笔
收集整理的這篇文章主要介紹了
SpringBoot 2.x 监控中心:Actuator
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
轉載請標明出處:http://blog.csdn.net/zhaoyanjun6/article/details/80762234
本文出自【趙彥軍的博客】
簡介
Actuator是spring boot項目中非常強大一個功能,有助于對應用程序進行監視和管理,通過 restful api請求來監管、審計、收集應用的運行情況,針對微服務而言它是必不可少的一個環節。
依賴集成
buildscript {ext {springBootVersion = '2.0.2.RELEASE'}repositories {mavenCentral()}dependencies {classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")} }apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management'group = 'com.yanjun' version = '0.0.1-SNAPSHOT' sourceCompatibility = 1.8repositories {mavenCentral() }dependencies {compile('org.springframework.boot:spring-boot-starter','org.springframework.boot:spring-boot-starter-web','org.springframework.boot:spring-boot-starter-actuator' //監控中心) }在application.yml 里填寫配置信息
management:server:port: 8083 #自定義actuator端口endpoints:web:exposure:include: "*" #監控所有的接口server:port: 8080 #自定義spring服務端口內置Endpoints
| beans | 顯示應用Spring Beans的完整列表 |
| health | 顯示應用的健康信息(未認證只顯示status,認證顯示全部信息詳情) |
| info | 顯示自定義的應用信息(在資源文件寫info.xxx即可) |
| mappings | 顯示所有 @RequestMapping 路徑集列表 |
| scheduledtasks | 顯示應用程序中的計劃任務 |
| threaddump | 顯示線程dump |
| httptrace | 示HTTP跟蹤信息(默認顯示最后100個HTTP請求 - 響應交換) |
| conditions | 顯示所有 @ConfigurationProperties 列表 |
| caches | 顯示可用緩存信息 |
個人微信號:zhaoyanjun125 , 歡迎關注
總結
以上是生活随笔為你收集整理的SpringBoot 2.x 监控中心:Actuator的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SpringBoot 2.x 整合Lom
- 下一篇: SpringBoot 2.x 监控中心: