server.port=80web management.endpoints.web.exposure.include=*spring management.endpoint.health.show-details=alwaysjson
info.app.id=1001安全 info.app.version=1.0.0app
management.endpoint.shutdown.enabled=truespa |
注:沒有management.security.enable的緣由3d
因爲spirng boot2(或者叫spring cloud的版本)問題,如今棄用了以前1.5版本的配置寫法,下面是新的配置方法。server
# 設置路由端點,查看jsonblog #actuator 啓用全部的監控端點 「*」號表明啓用全部的監控端點,能夠單獨啓用,例如,health,info,metricsci # spring boot 升爲 2.0 後,爲了安全,默認 Actuator 只暴露了2個端點,heath 和 info management: endpoints: web: exposure: include: "*" endpoint: health: show-details: ALWAYS |
訪問查看路由映射信息(端口是你項目的端口,啓動類註解@SpringBootApplication @EnableZuulProxy不要忘了): http://localhost:8080/actuator/routes http://localhost:8080/actuator/filters |