今天看同事代碼,發現這樣一個依賴,本身沒見過,搜來看看。app
actuator是監控系統健康狀況的工具。工具
配置:url
application.yml中指定監控的HTTP端口(若是不指定,則使用和Server相同的端口);指定去掉某項的檢查(好比不監控health.mail):線程
server: server
port: 8082 blog
management: io
port: 54001 email
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裏頭添加信息,好比info.contact.email=easonjim@163.com) false
GET /mappings 查看全部url映射 true
GET /metrics 查看應用基本指標 true
GET /metrics/{name} 查看具體指標 true
POST /shutdown 關閉應用(要真正生效,得配置文件開啓endpoints.shutdown.enabled: true) true
GET /trace 查看基本追蹤信息 true