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 |