spring boot admin

這裏記錄一個spring cloud的模板,有的模塊spring cloud eureka + spring boot admin + spring cloud zuul + 一個普通spring cloud服務service -Agit

eureka-server:註冊中心,api-gateway:網關,Admin-Server:spring boot admin的服務端,Service-A:普通服務Agithub

一、註冊中心spring

在瀏覽器中輸入localhost:1111,而後輸入waterlufei,123456就能夠看到註冊中心api

註冊中心這一塊,容許本身註冊(便於adminserver監控到),關閉服務安全保護,開啓權限控制瀏覽器

二、普通服務安全

訪問localhost:4445/test能返回接口數據hahah,訪問localhost:4445可以看到咱們本身寫的主頁性能

三、服務網關日誌

訪問localhost:2222/api-a/test能返回接口數據hahah,訪問localhost:2222/api-a/可以看到咱們本身寫的主頁,實現了經過網關訪問server

四、admin服務端blog

訪問localhost:9527,輸入waterlufei,9527可以看到性能監控頁面

 

 

 

 隨便點進去一個能夠看到服務的各類性能日誌等

 

須要注意的:

1.若是須要看到log選項,須要在服務的配置文件中,指定生成日誌文件

2.admin-server指定的服務名稱必須都是小寫

github源碼地址:https://github.com/waterlufei/spring-cloud

相關文章
相關標籤/搜索