作者:尹吉欢

来源:猿天地

1. /routes 端点

当@EnableZuulProxy与Spring Boot Actuator配合使用时,Zuul会暴露一个路由管理端点/routes。

借助这个端点,可以方便、直观地查看以及管理Zuul的路由。

将所有端点都暴露出来,增加下面的配置:

management.endpoints.web.exposure.include=*

访问 http://localhost:2103/actuator/routes 可以显示所有路由信息:

{ "/cxytiandi/**": "http://cxytiandi.com", "/hystrix-api/**": "hystrix-feign-demo""/api/**": "forward:/local","/hystrix-feign-demo
收藏 打印