今天看同事代碼,發現這樣一個依賴,自己沒見過,搜來看看,

actuator是監控系統健康情況的工具,
配置:
application.yml中指定監控的HTTP埠(如果不指定,則使用和Server相同的埠);指定去掉某項的檢查(比如不監控health.mail):
server:
port: 8082
management:
port: 54001
health:
mail:
enabled: false
使用:
HTTP方法 路徑 描述 鑒權
GET /autoconfig 查看自動配置的使用情況 true
GET /configprops 查看配置屬性,包括默認配置 true
GET /beans 查看bean及其關系串列 true
GET /dump 列印執行緒堆疊 true
GET /env 查看所有環境變數 true
GET /env/{name} 查看具體變數值 true
GET /health 查看應用健康指標 false
GET /info 查看應用資訊(需要自己在application.properties里頭添加資訊,比如[email protected]) false
GET /mappings 查看所有url映射 true
GET /metrics 查看應用基本指標 true
GET /metrics/{name} 查看具體指標 true
POST /shutdown 關閉應用(要真正生效,得組態檔開啟endpoints.shutdown.enabled: true) true
GET /trace 查看基本追蹤資訊 true
摘自:https://www.jianshu.com/p/d57dc9f2e0d9
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/121789.html
標籤:Java
上一篇:計算機專業,應該學習前端還是后端?具體有什么不一樣?
下一篇:Java技術平臺介紹
