From 38c3e8c80c9a2cecae73a4d263e2b6ec9079d031 Mon Sep 17 00:00:00 2001 From: YunaiV <> Date: Tue, 5 May 2020 00:01:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20Zuul=20=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +- .../src/main/resources/application.yaml | 8 + .../《芋道 Spring Cloud 网关 Zuul 入门》.md | 1 + pom.xml | 154 +++++++++--------- 4 files changed, 91 insertions(+), 78 deletions(-) create mode 100644 labx-21/《芋道 Spring Cloud 网关 Zuul 入门》.md diff --git a/README.md b/README.md index e843099c..4a3faf95 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +> 友情提示:因为提供了 50000+ 行示例代码,所以艿艿默认注释了所有 Maven Module。 +> +> 胖友可以根据自己的需要,修改 [`pom.xml`](https://github.com/YunaiV/SpringBoot-Labs/blob/master/pom.xml) 即可。 + 一个涵盖六个主流技术栈的**正经**仓库: * [《Spring Boot 专栏》](https://github.com/YunaiV/SpringBoot-Labs#spring-boot-%E4%B8%93%E6%A0%8F) * [《Spring Cloud Alibaba 专栏》](https://github.com/YunaiV/SpringBoot-Labs#spring-cloud-alibaba-%E4%B8%93%E6%A0%8F) @@ -182,7 +186,7 @@ ## API 网关 * [《芋道 Spring Cloud 服务网关 Spring Cloud Gateway 入门》](http://www.iocoder.cn/Spring-Cloud/Spring-Cloud-Gateway/?github) 对应 [labx-08](https://github.com/YunaiV/SpringBoot-Labs/tree/master/labx-08) -* 《芋道 Spring Cloud Netflix 服务网关 Zuul 入门》计划中... +* [《芋道 Spring Cloud Netflix 服务网关 Zuul 入门》](http://www.iocoder.cn/Spring-Cloud/Zuul/?github) 对应 对应 [labx-21](https://github.com/YunaiV/SpringBoot-Labs/tree/master/labx-21) * [《性能测试 —— Spring Cloud Gateway、Zuul 基准测试》](http://www.iocoder.cn/Performance-Testing/SpringCloudGateway-Zuul-benchmark/?github) 对应 [lab-07](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-07) > 如下非 Spring Cloud 网关,先放在这里... diff --git a/labx-21/labx-21-sc-zuul-demo09-actuator/src/main/resources/application.yaml b/labx-21/labx-21-sc-zuul-demo09-actuator/src/main/resources/application.yaml index b8355122..d4a4ce03 100644 --- a/labx-21/labx-21-sc-zuul-demo09-actuator/src/main/resources/application.yaml +++ b/labx-21/labx-21-sc-zuul-demo09-actuator/src/main/resources/application.yaml @@ -8,6 +8,14 @@ spring: # Zuul 配置项,对应 ZuulProperties 配置类 zuul: servlet-path: / # ZuulServlet 匹配的路径,默认为 /zuul + # 路由配置项,对应 ZuulRoute Map + routes: + route_yudaoyuanma: + path: /blog/** + url: http://www.iocoder.cn + route_oschina: + path: /oschina/** + url: https://www.oschina.net management: endpoints: diff --git a/labx-21/《芋道 Spring Cloud 网关 Zuul 入门》.md b/labx-21/《芋道 Spring Cloud 网关 Zuul 入门》.md new file mode 100644 index 00000000..6066f383 --- /dev/null +++ b/labx-21/《芋道 Spring Cloud 网关 Zuul 入门》.md @@ -0,0 +1 @@ + diff --git a/pom.xml b/pom.xml index 95dc0a32..7aed0be5 100644 --- a/pom.xml +++ b/pom.xml @@ -11,85 +11,85 @@ - lab-01 - lab-02 - lab-03 - lab-04 - lab-05 - lab-06 - lab-07 - lab-08 - lab-09 - lab-10 - lab-11 - lab-12 - lab-13 - lab-14 - lab-15 - lab-16 - lab-17 - lab-18 - lab-19 - lab-20 - lab-21 - lab-22 - lab-23 - lab-24 - lab-25 - lab-26 - lab-27 - lab-28 - lab-29 - lab-30 - lab-31 - lab-32 - lab-33 - lab-34 - lab-35 - lab-36 - lab-37 - lab-38 - lab-39 - lab-40 - lab-41 - lab-42 - lab-43 - lab-44 - lab-45 - lab-46 - lab-47 - lab-48 - lab-49 - lab-50 - lab-51 - lab-52 - lab-53 - lab-54 - lab-55 - lab-56 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - labx-01 - labx-02 - labx-03 - labx-04 - labx-05 - labx-06 - labx-07 - labx-08 - labx-09 - labx-10 - labx-11 - labx-12 - labx-13 - labx-14 - labx-15 - labx-16 - labx-17 - labx-18 - labx-19 - labx-20 - labx-21 + + + + + + + + + + + + + + + + + + + + +