https://blog.csdn.net/BW_Bear/article/details/88746646
https://github.com/zhaowei-zhang/CloudTest/tree/master/使用Zuul构建微服务网关/microservice-discovery-eureka
https://github.com/zhaowei-zhang/CloudTest/tree/master/使用Zuul构建微服务网关/microservice-provider-user
https://github.com/zhaowei-zhang/CloudTest/tree/master/使用Zuul构建微服务网关/microservice-consumer-movie-ribbon
https://github.com/zhaowei-zhang/CloudTest/tree/master/使用Zuul构建微服务网关/microservice-gateway-zuul
当@EnableZuulProxy与Spring Boot Actuator配合使用时,Zuul会暴露两个端点:/routes 和 filters 借助这些端点,可方便、直观的查看以及管理Zuul。
{
"/microservice-consumer-movie/**": "microservice-consumer-movie",
"/microservice-provider-user/**": "microservice-provider-user"
}
{
"/microservice-consumer-movie/**": {
"id": "microservice-consumer-movie",
"fullPath": "/microservice-consumer-movie/**",
"location": "microservice-consumer-movie",
"path": "/**",
"prefix": "/microservice-consumer-movie",
"retryable": false,
"customSensitiveHeaders": false,
"prefixStripped": true
},
"/microservice-provider-user/**": {
"id": "microservice-provider-user",
"fullPath": "/microservice-provider-user/**",
"location": "microservice-provider-user",
"path": "/**",
"prefix": "/microservice-provider-user",
"retryable": false,
"customSensitiveHeaders": false,
"prefixStripped": true
}
}
{
"error": [
{
"class": "org.springframework.cloud.netflix.zuul.filters.post.SendErrorFilter",
"order": 0,
"disabled": false,
"static": true
}
],
"post": [
{
"class": "org.springframework.cloud.netflix.zuul.filters.post.SendResponseFilter",
"order": 1000,
"disabled": false,
"static": true
}
],
"pre": [
{
"class": "org.springframework.cloud.netflix.zuul.filters.pre.DebugFilter",
"order": 1,
"disabled": false,
"static": true
},
{
"class": "org.springframework.cloud.netflix.zuul.filters.pre.FormBodyWrapperFilter",
"order": -1,
"disabled": false,
"static": true
},
{
"class": "org.springframework.cloud.netflix.zuul.filters.pre.Servlet30WrapperFilter",
"order": -2,
"disabled": false,
"static": true
},
{
"class": "org.springframework.cloud.netflix.zuul.filters.pre.ServletDetectionFilter",
"order": -3,
"disabled": false,
"static": true
},
{
"class": "org.springframework.cloud.netflix.zuul.filters.pre.PreDecorationFilter",
"order": 5,
"disabled": false,
"static": true
}
],
"route": [
{
"class": "org.springframework.cloud.netflix.zuul.filters.route.SimpleHostRoutingFilter",
"order": 100,
"disabled": false,
"static": true
},
{
"class": "org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter",
"order": 10,
"disabled": false,
"static": true
},
{
"class": "org.springframework.cloud.netflix.zuul.filters.route.SendForwardFilter",
"order": 500,
"disabled": false,
"static": true
}
]
}
https://blog.csdn.net/BW_Bear/article/details/88746646