1. 程式人生 > >使用 Actuator 監控

使用 Actuator 監控

text art context tor man star server png port

參考文章:https://www.jianshu.com/p/ba85f56a2013

Actuator 提供對自身應用的監控、配置查看等。

步驟一:導入actuator 依賴

<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>    

步驟二:在配置中加入屬性參數

server:
  port: 
8080 management: security: enabled: false #關掉安全認證 port: 8080 context-path: /monitor #actuator的訪問路徑 endpoints: shutdown: enabled: true beans: id: instances

步驟三:啟動查看

技術分享圖片

瀏覽器訪問:

技術分享圖片

使用 Actuator 監控