You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by gi...@apache.org on 2021/07/10 11:57:43 UTC
[incubator-shenyu-website] branch asf-site updated: deploy:
8adba2e7cdb1d9dd43fa4bf5d56ce0492e31e99a
This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu-website.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 9c3724e deploy: 8adba2e7cdb1d9dd43fa4bf5d56ce0492e31e99a
9c3724e is described below
commit 9c3724e16d4b23cec0ad00849a5dcf715e158d29
Author: github-actions[bot] <gi...@users.noreply.github.com>
AuthorDate: Sat Jul 10 11:57:36 2021 +0000
deploy: 8adba2e7cdb1d9dd43fa4bf5d56ce0492e31e99a
---
algolia.json | 2 +-
en/sitemap.xml | 2 +-
img/shenyu/plugin/plugin-chain-execute.png | Bin 0 -> 18044 bytes
img/shenyu/register/register-consul-admin-pom.png | Bin 0 -> 116003 bytes
img/shenyu/register/register-consul-admin-yml.png | Bin 0 -> 119545 bytes
img/shenyu/register/register-consul-client-pom.png | Bin 0 -> 83431 bytes
img/shenyu/register/register-consul-client-yml.png | Bin 0 -> 85796 bytes
img/shenyu/register/register-content.png | Bin 0 -> 84022 bytes
img/shenyu/register/register-etcd-admin-pom.png | Bin 0 -> 44335 bytes
img/shenyu/register/register-etcd-admin-yml.png | Bin 0 -> 67494 bytes
img/shenyu/register/register-etcd-client-pom.png | Bin 0 -> 78432 bytes
img/shenyu/register/register-etcd-client-yml.png | Bin 0 -> 69015 bytes
img/shenyu/register/register-http-admin-yml.png | Bin 0 -> 72642 bytes
img/shenyu/register/register-http-client-yml.png | Bin 0 -> 66795 bytes
img/shenyu/register/register-nacos-admin-pom.png | Bin 0 -> 66212 bytes
img/shenyu/register/register-nacos-admin-yml.png | Bin 0 -> 78107 bytes
img/shenyu/register/register-nacos-client-pom.png | Bin 0 -> 70971 bytes
img/shenyu/register/register-nacos-client-yml.png | Bin 0 -> 80759 bytes
img/shenyu/register/register-zk-admin-pom.png | Bin 0 -> 79560 bytes
img/shenyu/register/register-zk-admin-yml.png | Bin 0 -> 75974 bytes
img/shenyu/register/register-zk-client-pom.png | Bin 0 -> 92365 bytes
img/shenyu/register/register-zk-client-yml.png | Bin 0 -> 101528 bytes
sitemap.xml | 2 +-
zh/algolia.json | 2 +-
zh/index.xml | 2 +-
zh/projects/shenyu/flow-control/index.html | 27 +-----
zh/projects/shenyu/index.xml | 2 +-
.../shenyu/register-center-design/index.html | 102 +++++++++++----------
zh/sitemap.xml | 2 +-
29 files changed, 63 insertions(+), 80 deletions(-)
diff --git a/algolia.json b/algolia.json
index e33f5f3..432f651 100644
--- a/algolia.json
+++ b/algolia.json
@@ -1 +1 @@
-[{"author":"xiaoyu","categories":"Apache ShenYu","content":" Apache ICLA 签署流程指南 Apache CLA 全称 Apache Contributor License Agreement,签署ICLA的目的是定义向ASF贡献的文档,保护知识产权,避免后续法律纠纷。ICLA在官方存档后生效,贡献者方可参与Apache项目。\n当我们需要签署ICLA时步骤如下:\n1. 打开链接 官网Licenses 在Contributor License Agreements 下找到CLAs并进入页面。\n2. 在页面上方我们可以看到两个下载链接,选择ICLA(个人CLA)并下载文件。\n3. 打开PDF,ICLA需要填写的是两个部分,均需要全英文填写。\n 注意事项:\n 姓名需要填写拼音,姓与名之间空一格,首字母均为大写,名在前姓氏在后。 Committer相关的签署,则preferred Apache id(s)是必填项。 4.文件最下方的署名。 官网支持手写或者PDF签名软件\n5.签署完之后将icl [...]
\ No newline at end of file
+[{"author":"xiaoyu","categories":"Apache ShenYu","content":" Apache ICLA 签署流程指南 Apache CLA 全称 Apache Contributor License Agreement,签署ICLA的目的是定义向ASF贡献的文档,保护知识产权,避免后续法律纠纷。ICLA在官方存档后生效,贡献者方可参与Apache项目。\n当我们需要签署ICLA时步骤如下:\n1. 打开链接 官网Licenses 在Contributor License Agreements 下找到CLAs并进入页面。\n2. 在页面上方我们可以看到两个下载链接,选择ICLA(个人CLA)并下载文件。\n3. 打开PDF,ICLA需要填写的是两个部分,均需要全英文填写。\n 注意事项:\n 姓名需要填写拼音,姓与名之间空一格,首字母均为大写,名在前姓氏在后。 Committer相关的签署,则preferred Apache id(s)是必填项。 4.文件最下方的署名。 官网支持手写或者PDF签名软件\n5.签署完之后将icl [...]
\ No newline at end of file
diff --git a/en/sitemap.xml b/en/sitemap.xml
index 38b6708..ee0ee4b 100644
--- a/en/sitemap.xml
+++ b/en/sitemap.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>/projects/shenyu/</loc><lastmod>2021-07-10T19:56:14+08:00</lastmod><changefreq>monthly</changefreq><priority>0.5</priority><xhtml:link rel="alternate" hreflang="zh" href="/zh/projects/shenyu/"/><xhtml:link rel="alternate" hreflang="en" href="/projects/shenyu/"/></url><url><loc>/projects/shenyu-2.3.0/</loc><lastmod>2021-07- [...]
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>/projects/shenyu/</loc><lastmod>2021-07-10T19:56:55+08:00</lastmod><changefreq>monthly</changefreq><priority>0.5</priority><xhtml:link rel="alternate" hreflang="zh" href="/zh/projects/shenyu/"/><xhtml:link rel="alternate" hreflang="en" href="/projects/shenyu/"/></url><url><loc>/projects/shenyu-2.3.0/</loc><lastmod>2021-07- [...]
\ No newline at end of file
diff --git a/img/shenyu/plugin/plugin-chain-execute.png b/img/shenyu/plugin/plugin-chain-execute.png
new file mode 100644
index 0000000..98f95e8
Binary files /dev/null and b/img/shenyu/plugin/plugin-chain-execute.png differ
diff --git a/img/shenyu/register/register-consul-admin-pom.png b/img/shenyu/register/register-consul-admin-pom.png
new file mode 100644
index 0000000..3e3bfd8
Binary files /dev/null and b/img/shenyu/register/register-consul-admin-pom.png differ
diff --git a/img/shenyu/register/register-consul-admin-yml.png b/img/shenyu/register/register-consul-admin-yml.png
new file mode 100644
index 0000000..ee82a2b
Binary files /dev/null and b/img/shenyu/register/register-consul-admin-yml.png differ
diff --git a/img/shenyu/register/register-consul-client-pom.png b/img/shenyu/register/register-consul-client-pom.png
new file mode 100644
index 0000000..54b6fdd
Binary files /dev/null and b/img/shenyu/register/register-consul-client-pom.png differ
diff --git a/img/shenyu/register/register-consul-client-yml.png b/img/shenyu/register/register-consul-client-yml.png
new file mode 100644
index 0000000..40e10c0
Binary files /dev/null and b/img/shenyu/register/register-consul-client-yml.png differ
diff --git a/img/shenyu/register/register-content.png b/img/shenyu/register/register-content.png
new file mode 100644
index 0000000..f0d51c0
Binary files /dev/null and b/img/shenyu/register/register-content.png differ
diff --git a/img/shenyu/register/register-etcd-admin-pom.png b/img/shenyu/register/register-etcd-admin-pom.png
new file mode 100644
index 0000000..8de7679
Binary files /dev/null and b/img/shenyu/register/register-etcd-admin-pom.png differ
diff --git a/img/shenyu/register/register-etcd-admin-yml.png b/img/shenyu/register/register-etcd-admin-yml.png
new file mode 100644
index 0000000..832a24d
Binary files /dev/null and b/img/shenyu/register/register-etcd-admin-yml.png differ
diff --git a/img/shenyu/register/register-etcd-client-pom.png b/img/shenyu/register/register-etcd-client-pom.png
new file mode 100644
index 0000000..15b97d8
Binary files /dev/null and b/img/shenyu/register/register-etcd-client-pom.png differ
diff --git a/img/shenyu/register/register-etcd-client-yml.png b/img/shenyu/register/register-etcd-client-yml.png
new file mode 100644
index 0000000..7da96b9
Binary files /dev/null and b/img/shenyu/register/register-etcd-client-yml.png differ
diff --git a/img/shenyu/register/register-http-admin-yml.png b/img/shenyu/register/register-http-admin-yml.png
new file mode 100644
index 0000000..73579ad
Binary files /dev/null and b/img/shenyu/register/register-http-admin-yml.png differ
diff --git a/img/shenyu/register/register-http-client-yml.png b/img/shenyu/register/register-http-client-yml.png
new file mode 100644
index 0000000..a3176ab
Binary files /dev/null and b/img/shenyu/register/register-http-client-yml.png differ
diff --git a/img/shenyu/register/register-nacos-admin-pom.png b/img/shenyu/register/register-nacos-admin-pom.png
new file mode 100644
index 0000000..b704b7a
Binary files /dev/null and b/img/shenyu/register/register-nacos-admin-pom.png differ
diff --git a/img/shenyu/register/register-nacos-admin-yml.png b/img/shenyu/register/register-nacos-admin-yml.png
new file mode 100644
index 0000000..82350c0
Binary files /dev/null and b/img/shenyu/register/register-nacos-admin-yml.png differ
diff --git a/img/shenyu/register/register-nacos-client-pom.png b/img/shenyu/register/register-nacos-client-pom.png
new file mode 100644
index 0000000..ac49f00
Binary files /dev/null and b/img/shenyu/register/register-nacos-client-pom.png differ
diff --git a/img/shenyu/register/register-nacos-client-yml.png b/img/shenyu/register/register-nacos-client-yml.png
new file mode 100644
index 0000000..654045e
Binary files /dev/null and b/img/shenyu/register/register-nacos-client-yml.png differ
diff --git a/img/shenyu/register/register-zk-admin-pom.png b/img/shenyu/register/register-zk-admin-pom.png
new file mode 100644
index 0000000..9f35a75
Binary files /dev/null and b/img/shenyu/register/register-zk-admin-pom.png differ
diff --git a/img/shenyu/register/register-zk-admin-yml.png b/img/shenyu/register/register-zk-admin-yml.png
new file mode 100644
index 0000000..899de5a
Binary files /dev/null and b/img/shenyu/register/register-zk-admin-yml.png differ
diff --git a/img/shenyu/register/register-zk-client-pom.png b/img/shenyu/register/register-zk-client-pom.png
new file mode 100644
index 0000000..e648a7a
Binary files /dev/null and b/img/shenyu/register/register-zk-client-pom.png differ
diff --git a/img/shenyu/register/register-zk-client-yml.png b/img/shenyu/register/register-zk-client-yml.png
new file mode 100644
index 0000000..e59edfc
Binary files /dev/null and b/img/shenyu/register/register-zk-client-yml.png differ
diff --git a/sitemap.xml b/sitemap.xml
index 1e8e2db..7418a13 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?><sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>en/sitemap.xml</loc><lastmod>2021-07-10T19:56:14+08:00</lastmod></sitemap><sitemap><loc>zh/sitemap.xml</loc><lastmod>2021-07-10T19:56:14+08:00</lastmod></sitemap></sitemapindex>
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8" standalone="yes"?><sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>en/sitemap.xml</loc><lastmod>2021-07-10T19:56:55+08:00</lastmod></sitemap><sitemap><loc>zh/sitemap.xml</loc><lastmod>2021-07-10T19:56:55+08:00</lastmod></sitemap></sitemapindex>
\ No newline at end of file
diff --git a/zh/algolia.json b/zh/algolia.json
index e33f5f3..432f651 100644
--- a/zh/algolia.json
+++ b/zh/algolia.json
@@ -1 +1 @@
-[{"author":"xiaoyu","categories":"Apache ShenYu","content":" Apache ICLA 签署流程指南 Apache CLA 全称 Apache Contributor License Agreement,签署ICLA的目的是定义向ASF贡献的文档,保护知识产权,避免后续法律纠纷。ICLA在官方存档后生效,贡献者方可参与Apache项目。\n当我们需要签署ICLA时步骤如下:\n1. 打开链接 官网Licenses 在Contributor License Agreements 下找到CLAs并进入页面。\n2. 在页面上方我们可以看到两个下载链接,选择ICLA(个人CLA)并下载文件。\n3. 打开PDF,ICLA需要填写的是两个部分,均需要全英文填写。\n 注意事项:\n 姓名需要填写拼音,姓与名之间空一格,首字母均为大写,名在前姓氏在后。 Committer相关的签署,则preferred Apache id(s)是必填项。 4.文件最下方的署名。 官网支持手写或者PDF签名软件\n5.签署完之后将icl [...]
\ No newline at end of file
+[{"author":"xiaoyu","categories":"Apache ShenYu","content":" Apache ICLA 签署流程指南 Apache CLA 全称 Apache Contributor License Agreement,签署ICLA的目的是定义向ASF贡献的文档,保护知识产权,避免后续法律纠纷。ICLA在官方存档后生效,贡献者方可参与Apache项目。\n当我们需要签署ICLA时步骤如下:\n1. 打开链接 官网Licenses 在Contributor License Agreements 下找到CLAs并进入页面。\n2. 在页面上方我们可以看到两个下载链接,选择ICLA(个人CLA)并下载文件。\n3. 打开PDF,ICLA需要填写的是两个部分,均需要全英文填写。\n 注意事项:\n 姓名需要填写拼音,姓与名之间空一格,首字母均为大写,名在前姓氏在后。 Committer相关的签署,则preferred Apache id(s)是必填项。 4.文件最下方的署名。 官网支持手写或者PDF签名软件\n5.签署完之后将icl [...]
\ No newline at end of file
diff --git a/zh/index.xml b/zh/index.xml
index a9b54cb..1855824 100644
--- a/zh/index.xml
+++ b/zh/index.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Dromara on ShenYu</title><link>/zh/</link><description>Recent content in Dromara on ShenYu</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><atom:link href="/zh/index.xml" rel="self" type="application/rss+xml"/><item><title>ICLA 签署指南</title><link>/zh/community/icla/</link><pubDate>Tue, 18 May 2021 00:00:00 +0000</pubDate><guid>/z [...]
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Dromara on ShenYu</title><link>/zh/</link><description>Recent content in Dromara on ShenYu</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><atom:link href="/zh/index.xml" rel="self" type="application/rss+xml"/><item><title>ICLA 签署指南</title><link>/zh/community/icla/</link><pubDate>Tue, 18 May 2021 00:00:00 +0000</pubDate><guid>/z [...]
\ No newline at end of file
diff --git a/zh/projects/shenyu/flow-control/index.html b/zh/projects/shenyu/flow-control/index.html
index 2abdae3..8802984 100644
--- a/zh/projects/shenyu/flow-control/index.html
+++ b/zh/projects/shenyu/flow-control/index.html
@@ -13,30 +13,9 @@
<a class=dropdown-item href=http://www.apache.org/events/current-event>Apache Events</a>
<a class=dropdown-item href=https://www.apache.org/licenses/>Security</a>
<a class=dropdown-item href=http://www.apache.org/foundation/sponsorship.html>Sponsor and Donate</a>
-<a class=dropdown-item href=http://www.apache.org/foundation/thanks.html>Thanks</a></div></span></div><div class=navbar-end><div class=navbar-item><div id=js-menu-search class=navbar-search><input class=input placeholder=请输入要搜索的关键词><svg class="icon" aria-hidden="true"><use xlink:href="#icon-search"/></svg></div></div><div class=navbar-item></div></div></div></nav></header><div class=ss-layout-container><aside class="ss-layout-aside -left ss-card -soft-hidden"><div id=js-drawer class=ss-t [...]
-<code>sql
-CREATE TABLE IF NOT EXISTS `plugin_handle` (
-`id` varchar(128) NOT NULL,
-`plugin_id` varchar(128) NOT NULL COMMENT '插件id',
-`field` varchar(100) NOT NULL COMMENT '字段',
-`label` varchar(100) DEFAULT NULL COMMENT '标签',
-`data_type` smallint(6) NOT NULL DEFAULT '1' COMMENT '数据类型 1 数字 2 字符串 3 下拉框',
-`type` smallint(6) NULL COMMENT '类型,1 表示选择器,2 表示规则',
-`sort` int(4) NULL COMMENT '排序',
-`ext_obj` varchar(1024) DEFAULT NULL COMMENT '额外配置(json格式数据)',
-`date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
-`date_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
-PRIMARY KEY (`id`),
-UNIQUE KEY `plugin_id_field_type` (`plugin_id`,`field`,`type`)
-) ENGINE=InnoDB;</code>
-## 选择器和规则
-* 选择器和规则是 ShenYu 网关中最灵魂的东西。掌握好它,你可以对任何流量进行管理。
-* 本篇主要详解 ShenYu 网关中,选择器与规则的概念,以及如何使用。
-#### 大体理解
-* 一个插件有多个选择器,一个选择器对应多种规则。选择器相当于是对流量的一级筛选,规则就是最终的筛选。
-* 我们想象一下,在一个插件里面,我们是不是希望根据我们的配置,达到满足条件的流量,我们插件才去执行它?
-* 选择器和规则就是为了让流量在满足特定的条件下,才去执行我们想要的,这种规则我们首先要明白。
-* 数据结构可以参考之前的 <a href=../database-design>数据库设计</a>。</li></ul></article></main></div><footer class=ss-footer><div class=container><div class=links><div class="cate -show-mobile"><h2 class=cate-title>Apache</h2><a class=link href=https://www.apache.org/>Foundation</a>
+<a class=dropdown-item href=http://www.apache.org/foundation/thanks.html>Thanks</a></div></span></div><div class=navbar-end><div class=navbar-item><div id=js-menu-search class=navbar-search><input class=input placeholder=请输入要搜索的关键词><svg class="icon" aria-hidden="true"><use xlink:href="#icon-search"/></svg></div></div><div class=navbar-item></div></div></div></nav></header><div class=ss-layout-container><aside class="ss-layout-aside -left ss-card -soft-hidden"><div id=js-drawer class=ss-t [...]
+对一个插件而言,我们希望根据我们的配置,达到满足条件的流量,插件才会被执行。
+选择器和规则就是为了让流量在满足特定的条件下,才去执行我们想要的,这种规则首先要明白。</p><p>插件、选择器和规则执行逻辑如下,当流量进入到<code>ShenYu</code>网关之后,会先判断是否有对应的插件,该插件是否开启;然后判断流量是否匹配该插件的选择器;然后再判断流量是否匹配该选择器的规则。如果请求流量能满足匹配条件才会执行该插件,否则插件不会被执行,处理下一个。<code>ShenYu</code>网关就是这样通过层层筛选完成流量控制。</p><p><img src=/img/shenyu/plugin/plugin-chain-execute.png width=40% height=30%></p></article></main></div><footer class=ss-footer><div class=container><div class=links><div class="cate -show-mobile"><h2 class=cate-title>Apache</h2><a class=link href=https://ww [...]
<a class=link href=https://github.com/apache/incubator-shenyu/issues>GitHub Issue Tracker</a>
<a class=link href=https://www.apache.org/licenses/>License</a>
<a class=link href=https://www.apache.org/security/>Security</a>
diff --git a/zh/projects/shenyu/index.xml b/zh/projects/shenyu/index.xml
index 9b23974..828bf8d 100644
--- a/zh/projects/shenyu/index.xml
+++ b/zh/projects/shenyu/index.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Apache ShenYu(current) on ShenYu</title><link>/zh/projects/shenyu/</link><description>Recent content in Apache ShenYu(current) on ShenYu</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><atom:link href="/zh/projects/shenyu/index.xml" rel="self" type="application/rss+xml"/><item><title>Apache ShenYu 介绍</title><link>/zh/projects/sh [...]
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Apache ShenYu(current) on ShenYu</title><link>/zh/projects/shenyu/</link><description>Recent content in Apache ShenYu(current) on ShenYu</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><atom:link href="/zh/projects/shenyu/index.xml" rel="self" type="application/rss+xml"/><item><title>Apache ShenYu 介绍</title><link>/zh/projects/sh [...]
\ No newline at end of file
diff --git a/zh/projects/shenyu/register-center-design/index.html b/zh/projects/shenyu/register-center-design/index.html
index cf8ec7d..28582e3 100644
--- a/zh/projects/shenyu/register-center-design/index.html
+++ b/zh/projects/shenyu/register-center-design/index.html
@@ -1,4 +1,4 @@
-<!doctype html><html><head><title>注册中心设计 · ShenYu</title><meta charset=utf-8><meta http-equiv=x-ua-compatible content="IE=edge,chrome=1"><meta name=viewport content="width=device-width,minimum-scale=1"><meta name=description content="The girl on the prairie"><meta name=generator content="Hugo 0.55.5"><link rel="shortcut icon" href=/img/favicon.png type=image/png><link href=https://unpkg.com/purecss@1.0.0/build/base-min.css rel=stylesheet><link href=/css/main.css rel=stylesheet><link href [...]
+<!doctype html><html><head><title>应用客户端接入 · ShenYu</title><meta charset=utf-8><meta http-equiv=x-ua-compatible content="IE=edge,chrome=1"><meta name=viewport content="width=device-width,minimum-scale=1"><meta name=description content="The girl on the prairie"><meta name=generator content="Hugo 0.55.5"><link rel="shortcut icon" href=/img/favicon.png type=image/png><link href=https://unpkg.com/purecss@1.0.0/build/base-min.css rel=stylesheet><link href=/css/main.css rel=stylesheet><link hre [...]
<a href=/zh/projects/shenyu/overview/><span>文档</span><svg class="icon" aria-hidden="true"><use xlink:href="#icon-ARROW"/></svg></a>
<a href=/zh/community/code-conduct/><span>社区</span><svg class="icon" aria-hidden="true"><use xlink:href="#icon-ARROW"/></svg></a>
<a href=/zh/news/><span>新闻</span><svg class="icon" aria-hidden="true"><use xlink:href="#icon-ARROW"/></svg></a>
@@ -14,7 +14,8 @@
<a class=dropdown-item href=http://www.apache.org/events/current-event>Apache Events</a>
<a class=dropdown-item href=https://www.apache.org/licenses/>Security</a>
<a class=dropdown-item href=http://www.apache.org/foundation/sponsorship.html>Sponsor and Donate</a>
-<a class=dropdown-item href=http://www.apache.org/foundation/thanks.html>Thanks</a></div></span></div><div class=navbar-end><div class=navbar-item><div id=js-menu-search class=navbar-search><input class=input placeholder=请输入要搜索的关键词><svg class="icon" aria-hidden="true"><use xlink:href="#icon-search"/></svg></div></div><div class=navbar-item><a class=translation href=/projects/shenyu/register-center-design/>En</a></div></div></div></nav></header><div class=ss-layout-container><aside class= [...]
+<a class=dropdown-item href=http://www.apache.org/foundation/thanks.html>Thanks</a></div></span></div><div class=navbar-end><div class=navbar-item><div id=js-menu-search class=navbar-search><input class=input placeholder=请输入要搜索的关键词><svg class="icon" aria-hidden="true"><use xlink:href="#icon-search"/></svg></div></div><div class=navbar-item><a class=translation href=/projects/shenyu/register-center-design/>En</a></div></div></div></nav></header><div class=ss-layout-container><aside class= [...]
+应用程序启动时使用<code>SPI</code>方式加载并初始化对应注册中心客户端,通过实现<code>Spring Bean</code>相关的后置处理器接口,在其中获取需要进行注册的服务接口信息,将获取的信息放入<code>Disruptor</code>中。</p><p>注册中心客户端从<code>Disruptor</code>中读取数据,并将接口信息注册到<code>shenyu-admin</code>,<code>Disruptor</code>在其中起数据与操作解耦的作用,利于扩展。</p><h3 id=注册中心服务端>注册中心服务端</h3><p><img src=/img/shenyu/register/server.png alt></p><p>在<code>shenyu-admin</code>配置中声明注册中心服务端类型,如<code>Http</code>或<code>Zookeeper</code>。当<code>shenyu-admin</code>启动时,读取配置类型,加载并初始化对应的注册中心服务端,注册中心服务端收到<code>s [...]
├──regsiter
├ ├──metadata
├ ├ ├──${rpcType}
@@ -25,7 +26,7 @@
├ ├ ├ ├────${contextPath}
├ ├ ├ ├──${ip:prot} : save uri data of URIRegisterDTO
├ ├ ├ ├──${ip:prot}
-</code></pre><p>Shenyu-Client启动时,将服务接口信息(MetaDataRegisterDTO/URIRegisterDTO)写到如上的zookeeper节点中。</p><p>Shenyu-Admin使用Zookeeper的Watch机制,对数据的更新和删除等事件进行监听,数据变更后触发对应的注册处理逻辑。</p><p>在收到MetaDataRegisterDTO节点变更后,触发selector和rule的数据变更和数据同步事件发布。</p><p>收到URIRegisterDTO节点变更后,触发selector的upstream的更新和数据同步事件发布。</p><h2 id=etcd-注册>Etcd 注册</h2><p>Etcd的键值存储结构如下:</p><pre><code>shenyu
+</code></pre><p><code>shenyu-client</code>启动时,将服务接口信息(<code>MetaDataRegisterDTO/URIRegisterDTO</code>)写到如上的<code>zookeeper</code>节点中。</p><p><code>shenyu-admin</code>使用<code>Zookeeper</code>的<code>Watch</code>机制,对数据的更新和删除等事件进行监听,数据变更后触发对应的注册处理逻辑。在收到<code>MetaDataRegisterDTO</code>节点变更后,触发<code>selector</code>和<code>rule</code>的数据变更和数据同步事件发布。收到<code>URIRegisterDTO</code>节点变更后,触发<code>selector</code>的<code>upstream</code>的更新和数据同步事件发布。</p><h2 id=etcd注册原理>Etcd注册原理</h2><p><code>Etcd</code>的键值存 [...]
├──regsiter
├ ├──metadata
├ ├ ├──${rpcType}
@@ -36,24 +37,23 @@
├ ├ ├ ├────${contextPath}
├ ├ ├ ├──${ip:prot} : save uri data of URIRegisterDTO
├ ├ ├ ├──${ip:prot}
-</code></pre><p>Shenyu-Client启动时,将服务接口信息(MetaDataRegisterDTO/URIRegisterDTO)以Ephemeral方式写到如上的Etcd节点中。</p><p>Shenyu-Admin使用Etcd的Watch机制,对数据的更新和删除等事件进行监听,数据变更后触发对应的注册处理逻辑。</p><p>在收到MetaDataRegisterDTO节点变更后,触发selector和rule的数据变更和数据同步事件发布。</p><p>收到URIRegisterDTO节点变更后,触发selector的upstream的更新和数据同步事件发布。</p><h2 id=consul-注册>Consul 注册</h2><p>Consul的Metadata和URI分两部分存储,URIRegisterDTO随着服务注册记录在服务的metadata里,服务下线时随着服务节点一起消失。</p><p><img src=/img/shenyu/register/Consul-ui.png alt></p><p>Consul的MetaDataRegi [...]
+</code></pre><p><code>shenyu-client</code>启动时,将服务接口信息(<code>MetaDataRegisterDTO/URIRegisterDTO</code>)以<code>Ephemeral</code>方式写到如上的<code>Etcd</code>节点中。</p><p><code>shenyu-admin</code>使用<code>Etcd</code>的<code>Watch</code>机制,对数据的更新和删除等事件进行监听,数据变更后触发对应的注册处理逻辑。在收到<code>MetaDataRegisterDTO</code>节点变更后,触发<code>selector</code>和<code>rule</code>的数据变更和数据同步事件发布。收到<code>URIRegisterDTO</code>节点变更后,触发<code>selector</code>的<code>upstream</code>的更新和数据同步事件发布。</p><h2 id=consul注册原理>Consul注册原理</h2><p><c [...]
├──regsiter
├ ├──metadata
├ ├ ├──${rpcType}
├ ├ ├ ├────${contextPath}
├ ├ ├ ├──${ruleName} : save metadata data of MetaDataRegisterDTO
-</code></pre><p>Shenyu-Client启动时,将服务接口信息(MetaDataRegisterDTO/URIRegisterDTO)分别放在ServiceInstance的Metadata(URIRegisterDTO)和KeyValue(MetaDataRegisterDTO),按照上述方式进行存储。</p><p>Shenyu-Admin通过监听Catalog和KeyValue的index的变化,来感知数据的更新和删除,数据变更后触发对应的注册处理逻辑。</p><p>在收到MetaDataRegisterDTO节点变更后,触发selector和rule的数据变更和数据同步事件发布。</p><p>收到URIRegisterDTO节点变更后,触发selector的upstream的更新和数据同步事件发布。</p><h2 id=nacos-注册>Nacos 注册</h2><p>Nacos分为两部分:URI 和 Metadata。</p><p>URI 使用实例注册方式,在服务异常的情况下,相关URI数据节点会自动进行删除,并发送事件到订阅端,订阅端进行相关 [...]
-</code></pre><p>初始监听所有的RpcType节点,其下的{contextPath}实例会对应注册到其下,根据IP和Port进行区分,并携带其对应的contextPath信息。</p><p>URI 实例上下线之后,触发selector的upstream的更新和数据同步事件发布。</p><p>URI 实例上线时,会发布对应的 Metadata 数据,其节点名称命令规则如下:</p><pre><code>shenyu.register.service.${rpcType}.${contextPath}
-</code></pre><p>订阅端会对所有的Metadata配置继续监听,当初次订阅和配置更新后,触发selector和rule的数据变更和数据同步事件发布。</p><h2 id=spi-扩展>SPI 扩展</h2><table><thead><tr><th><em>SPI 名称</em></th><th><em>详细说明</em></th></tr></thead><tbody><tr><td>ShenyuClientRegisterRepository</td><td>ShenYu网关客户端接入注册服务资源</td></tr></tbody></table><table><thead><tr><th><em>已知实现类</em></th><th><em>详细说明</em></th></tr></thead><tbody><tr><td>HttpClientRegisterRepository</td><td>基于Http请求的实现</td></tr><tr><td>ZookeeperClientRegisterRepository</td><td>基于Zooke [...]
-keywords: shenyu</p><h2 id=description-注册中心接入配置>description: 注册中心接入配置</h2><h2 id=快速接入>快速接入</h2><p>说明然后使用不同的注册方式,快速接入。</p><h2 id=http方式注册>HTTP方式注册</h2><h4 id=shenyu-admin配置>Shenyu-Admin配置</h4><p>在 application.yml 配置注册中心为HTTP即可,如下:</p><pre><code class=language-yaml>shenyu:
+</code></pre><p><code>shenyu-client</code>启动时,将服务接口信息(<code>MetaDataRegisterDTO/URIRegisterDTO</code>)分别放在<code>ServiceInstance</code>的<code>Metadata</code>(<code>URIRegisterDTO</code>)和<code>KeyValue</code>(<code>MetaDataRegisterDTO</code>),按照上述方式进行存储。</p><p><code>shenyu-admin</code>通过监听<code>Catalog</code>和<code>KeyValue</code>的<code>index</code>的变化,来感知数据的更新和删除,数据变更后触发对应的注册处理逻辑。在收到<code>MetaDataRegisterDTO</code>节点变更后,触发<code>selector</code>和<code>rule</code>的数据变更和数据同步事件发布。收到<code>URIR [...]
+</code></pre><p>初始监听所有的<code>RpcType</code>节点,其下的<code>{contextPath}</code>实例会对应注册到其下,根据<code>IP</code>和<code>Port</code>进行区分,并携带其对应的<code>contextPath</code>信息。<code>URI</code> 实例上下线之后,触发<code>selector</code>的<code>upstream</code>的更新和数据同步事件发布。</p><p><code>URI</code> 实例上线时,会发布对应的 <code>Metadata</code> 数据,其节点名称命令规则如下:</p><pre><code>shenyu.register.service.${rpcType}.${contextPath}
+</code></pre><p>订阅端会对所有的<code>Metadata</code>配置继续监听,当初次订阅和配置更新后,触发<code>selector</code>和<code>rule</code>的数据变更和数据同步事件发布。</p><h3 id=spi扩展>SPI扩展</h3><table><thead><tr><th><em>SPI 名称</em></th><th><em>详细说明</em></th></tr></thead><tbody><tr><td>ShenyuClientRegisterRepository</td><td>ShenYu网关客户端接入注册服务资源</td></tr></tbody></table><table><thead><tr><th><em>已知实现类</em></th><th><em>详细说明</em></th></tr></thead><tbody><tr><td>HttpClientRegisterRepository</td><td>基于Http请求的实现</td></tr><tr><td>ZookeeperCli [...]
register:
registerType: http
props:
checked: true #是否开启检测
zombieCheckTimes: 5 #失败几次后剔除服务
scheduledTime: 10 #定时检测间隔时间 (秒)
-</code></pre><h4 id=shenyu-client配置>Shenyu-Client配置</h4><p>在 application.yml 中配置注册方式为HTTP,并填写Shenyu-Admin服务地址列表,如下:</p><pre><code class=language-yaml>shenyu:
+</code></pre><p><img src=/img/shenyu/register/register-http-admin-yml.png width=70% height=60%></p><h4 id=shenyu-client配置>shenyu-client配置</h4><p>下面展示的是<code>http</code>服务作为客户端接入到<code>ShenYu</code>网关时,通过<code>Http</code>方式注册配置信息。其他客户端接入时(<code>Dubbo</code>、 <code>Spring Cloud</code>等),配置方式同理。</p><p>在微服务中的 <code>yml</code>文件配置注册方式设置为<code>http</code>,并填写<code>shenyu-admin</code>服务地址列表,配置信息如下:</p><pre><code class=language-yaml>shenyu:
client:
registerType: http
serverLists: http://localhost:9095
@@ -65,87 +65,91 @@ keywords: shenyu</p><h2 id=description-注册中心接入配置>description: 注
# registerType : 服务注册类型,填写 http
# serverList: 为http注册类型时,填写Shenyu-Admin项目的地址,注意加上http://,多个地址用英文逗号分隔
# port: 你本项目的启动端口,目前springmvc/tars/grpc需要进行填写
-# contextPath: 为你的这个mvc项目在shenyu网关的路由前缀,这个你应该懂意思把? 比如/order ,/product 等等,网关会根据你的这个前缀来进行路由.
+# contextPath: 为你的这个mvc项目在shenyu网关的路由前缀, 比如/order ,/product 等等,网关会根据你的这个前缀来进行路由.
# appName:你的应用名称,不配置的话,会默认取 `spring.application.name` 的值
# isFull: 设置true 代表代理你的整个服务,false表示代理你其中某几个controller;目前适用于springmvc/springcloud
-</code></pre><h2 id=zookeeper方式注册>Zookeeper方式注册</h2><h4 id=shenyu-admin配置-1>Shenyu-Admin配置</h4><ul><li>首先在 pom.xml 文件中加入相关的依赖(默认已经引入):</li></ul><pre><code class=language-xml> <dependency>
+</code></pre><p><img src=/img/shenyu/register/register-http-client-yml.png width=70% height=60%></p><h3 id=zookeeper方式注册配置>Zookeeper方式注册配置</h3><h4 id=shenyu-admin配置-1>shenyu-admin配置</h4><ul><li>首先在 <code>pom</code> 文件中加入相关的依赖(默认已经引入):</li></ul><pre><code class=language-xml> <dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-register-server-zookeeper</artifactId>
<version>${project.version}</version>
</dependency>
-</code></pre><ul><li>在 application.yml 配置注册中心为Zookeeper,填写相关zookeeper服务地址和参数,如下:</li></ul><pre><code class=language-yaml>shenyu:
+</code></pre><p><img src=/img/shenyu/register/register-zk-admin-pom.png width=70% height=60%></p><ul><li>然后在<code>yml</code>文件中配置注册类型为<code>zookeeper</code>,填写<code>zookeeper</code>服务地址和参数,配置信息如下:</li></ul><pre><code class=language-yaml>shenyu:
register:
registerType: zookeeper
- serverLists : localhost:2181
+ serverLists: localhost:2181
props:
sessionTimeout: 5000
connectionTimeout: 2000
-</code></pre><h4 id=shenyu-client配置-1>Shenyu-Client配置</h4><ul><li>首先在 pom.xml 文件中加入相关的依赖(默认已经引入):</li></ul><pre><code class=language-xml> <dependency>
+</code></pre><p><img src=/img/shenyu/register/register-zk-admin-yml.png width=70% height=60%></p><h4 id=shenyu-client配置-1>shenyu-client配置</h4><p>下面展示的是<code>http</code>服务作为客户端接入到<code>ShenYu</code>网关时,通过<code>Zookeeper</code>方式注册配置信息。其他客户端接入时(<code>Dubbo</code>、 <code>Spring Cloud</code>等),配置方式同理。</p><ul><li>首先在 <code>pom</code>文件中加入相关的依赖:</li></ul><pre><code class=language-xml> <!--shenyu zookeeper register center -->
+ <dependency>
<groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-register-client-zookeeper</artifactId>
- <version>${project.version}</version>
+ <artifactId>shenyu-register-server-zookeeper</artifactId>
+ <version>${shenyu.version}</version>
</dependency>
-</code></pre><ul><li>在 application.yml 中配置注册方式为Zookeeper,并填写Zookeeper服务地址和相关参数,如下:</li></ul><pre><code class=language-yaml>shenyu:
+</code></pre><p><img src=/img/shenyu/register/register-zk-client-pom.png width=70% height=60%></p><ul><li>然后在 <code>yml</code> 中配置注册类型为<code>zookeeper</code>,并填写<code>Zookeeper</code>服务地址和相关参数,如下:</li></ul><pre><code class=language-yaml>shenyu:
client:
registerType: zookeeper
serverLists: localhost:2181
props:
contextPath: /http
appName: http
- port: 8188
+ port: 8189
isFull: false
# registerType : 服务注册类型,填写 zookeeper
# serverList: 为zookeeper注册类型时,填写zookeeper地址,多个地址用英文分隔
# port: 你本项目的启动端口,目前springmvc/tars/grpc需要进行填写
-# contextPath: 为你的这个mvc项目在shenyu网关的路由前缀,这个你应该懂意思把? 比如/order ,/product 等等,网关会根据你的这个前缀来进行路由.
+# contextPath: 为你的这个mvc项目在shenyu网关的路由前缀, 比如/order ,/product 等等,网关会根据你的这个前缀来进行路由.
# appName:你的应用名称,不配置的话,会默认取 `spring.application.name` 的值
# isFull: 设置true 代表代理你的整个服务,false表示代理你其中某几个controller;目前适用于springmvc/springcloud
-</code></pre><h2 id=etcd方式注册>Etcd方式注册</h2><h4 id=shenyu-admin配置-2>Shenyu-Admin配置</h4><ul><li>首先在 pom.xml 文件中加入相关的依赖(默认已经引入):</li></ul><pre><code class=language-xml> <dependency>
+</code></pre><p><img src=/img/shenyu/register/register-zk-client-yml.png width=70% height=60%></p><h3 id=etcd方式注册配置>Etcd方式注册配置</h3><h4 id=shenyu-admin配置-2>shenyu-admin配置</h4><ul><li>首先在 <code>pom</code> 文件中加入相关的依赖(默认已经引入):</li></ul><pre><code class=language-xml> <dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-register-server-etcd</artifactId>
<version>${project.version}</version>
</dependency>
-</code></pre><ul><li>在 application.yml 配置注册中心为etcd, 填写相关etcd服务地址和参数,如下:</li></ul><pre><code class=language-yaml>shenyu:
+</code></pre><p><img src=/img/shenyu/register/register-etcd-admin-pom.png width=70% height=60%></p><ul><li>然后在 <code>yml</code> 配置注册类型为<code>etcd</code>, 填写<code>etcd</code>服务地址和参数,配置信息如下:</li></ul><pre><code class=language-yaml>shenyu:
register:
registerType: etcd
serverLists : http://localhost:2379
props:
etcdTimeout: 5000
etcdTTL: 5
-</code></pre><h4 id=shenyu-client配置-2>Shenyu-Client配置</h4><ul><li>首先在 pom.xml 文件中加入相关的依赖(默认已经引入):</li></ul><pre><code class=language-xml> <dependency>
+</code></pre><p><img src=/img/shenyu/register/register-etcd-admin-yml.png width=70% height=60%></p><h4 id=shenyu-client配置-2>shenyu-client配置</h4><p>下面展示的是<code>http</code>服务作为客户端接入到<code>ShenYu</code>网关时,通过<code>Etcd</code>方式注册配置信息。其他客户端接入时(<code>Dubbo</code>、 <code>Spring Cloud</code>等),配置方式同理。</p><ul><li>首先在 <code>pom</code> 文件中加入相关的依赖:</li></ul><pre><code class=language-xml> <!--shenyu etcd register center -->
+ <dependency>
<groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-register-client-etcd</artifactId>
- <version>${project.version}</version>
+ <artifactId>shenyu-register-server-etcd</artifactId>
+ <version>${shenyu.version}</version>
</dependency>
-</code></pre><ul><li>在 application.yml 中配置注册方式为etcd, 并填写etcd服务地址和相关参数,如下:</li></ul><pre><code class=language-yaml>shenyu:
+</code></pre><p><img src=/img/shenyu/register/register-etcd-client-pom.png width=70% height=60%></p><ul><li>然后在 <code>yml</code> 中配置注册类型为<code>etcd</code>, 并填写<code>etcd</code>服务地址和相关参数,如下:</li></ul><pre><code class=language-yaml>shenyu:
client:
registerType: etcd
serverLists: http://localhost:2379
props:
contextPath: /http
appName: http
- port: 8188
+ port: 8189
isFull: false
# registerType : 服务注册类型,填写 etcd
# serverList: 为etcd注册类型时,填写etcd地址,多个地址用英文分隔
# port: 你本项目的启动端口,目前springmvc/tars/grpc需要进行填写
-# contextPath: 为你的这个mvc项目在shenyu网关的路由前缀,这个你应该懂意思把? 比如/order ,/product 等等,网关会根据你的这个前缀来进行路由.
+# contextPath: 为你的这个mvc项目在shenyu网关的路由前缀, 比如/order ,/product 等等,网关会根据你的这个前缀来进行路由.
# appName:你的应用名称,不配置的话,会默认取 `spring.application.name` 的值
# isFull: 设置true 代表代理你的整个服务,false表示代理你其中某几个controller;目前适用于springmvc/springcloud
-</code></pre><h2 id=consul方式注册>Consul方式注册</h2><h4 id=shenyu-admin配置-3>Shenyu-Admin配置</h4><ul><li>首先在 pom.xml 文件中加入相关的依赖:</li></ul><pre><code class=language-xml> <!--shenyu-register-server-consul默认已经引入-->
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-register-server-consul</artifactId>
- <version>${project.version}</version>
- </dependency>
+</code></pre><p><img src=/img/shenyu/register/register-etcd-client-yml.png width=70% height=60%></p><h3 id=consul方式注册配置>Consul方式注册配置</h3><h4 id=shenyu-admin配置-3>shenyu-admin配置</h4><ul><li>首先在 pom.xml 文件中加入相关的依赖:</li></ul><pre><code class=language-xml> <!--shenyu consul register start-->
+ <dependency>
+ <groupId>org.apache.shenyu</groupId>
+ <artifactId>shenyu-register-server-consul</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <!--spring-cloud-starter-consul-discovery需要用户自行引入,建议选用2.2.6.RELEASE版本,其他版本不保证正常工作-->
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-starter-consul-discovery</artifactId>
+ <version>2.2.6.RELEASE</version>
+ </dependency>
+ <!--shenyu consul register end-->
- <!--spring-cloud-starter-consul-discovery需要用户自行引入,建议选用2.2.6.RELEASE版本,其他版本不保证正常工作-->
- <dependency>
- <groupId>org.springframework.cloud</groupId>
- <artifactId>spring-cloud-starter-consul-discovery</artifactId>
- <version>2.2.6.RELEASE</version>
- </dependency>
-</code></pre><ul><li>在 application.yml 配置注册中心为consul, 额外还需要配置spring.cloud.consul, 如下:</li></ul><pre><code class=language-yaml>shenyu:
+</code></pre><p><img src=/img/shenyu/register/register-consul-admin-pom.png width=70% height=60%></p><ul><li>在 <code>yml</code>文件配置注册中心为<code>consul</code>, 额外还需要配置<code>spring.cloud.consul</code>, 配置信息如下:</li></ul><pre><code class=language-yaml>shenyu:
register:
registerType: consul
props:
@@ -171,12 +175,12 @@ spring:
# port: 为 consul 注册类型时,填写 consul 端口, 默认是8500
# tags-as-metadata: false, 必填,如果不填默认为true,则无法读取metadata里的URI信息导致selector的upstream数据更新失败。
-</code></pre><h4 id=shenyu-client配置-3>Shenyu-Client配置</h4><p><strong>注意,consul注册中心目前和SpringCloud服务不兼容,会和Eureka/Nacos注册中心冲突</strong></p><ul><li>首先在 pom.xml 文件中加入相关的依赖(需要自行引入):</li></ul><pre><code class=language-xml> <dependency>
+</code></pre><p><img src=/img/shenyu/register/register-consul-admin-yml.png width=70% height=60%></p><h4 id=shenyu-client配置-3>shenyu-client配置</h4><p><strong>注意,<code>consul</code>注册中心目前和<code>SpringCloud</code>服务不兼容,会和<code>Eureka/Nacos</code>注册中心冲突</strong></p><p>下面展示的是<code>http</code>服务作为客户端接入到<code>ShenYu</code>网关时,通过<code>Consul</code>方式注册配置信息。其他客户端接入时(<code>Dubbo</code>、 <code>Spring Cloud</code>等),配置方式同理。</p><ul><li>首先在 <code>pom</code> 文件中加入相关的依赖:</li></ul><pre><code class=langua [...]
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-consul-discovery</artifactId>
<version>2.2.6.RELEASE</version>
</dependency>
-</code></pre><ul><li>在 application.yml 中配置注册方式为consul, 额外还需要配置spring.cloud.consul, 如下:</li></ul><pre><code class=language-yaml>shenyu:
+</code></pre><p><img src=/img/shenyu/register/register-consul-client-pom.png width=70% height=60%></p><ul><li>然后在 <code>yml</code>文件中配置注册方式为<code>consul</code>, 额外还需要配置<code>spring.cloud.consul</code>, 配置信息如下:</li></ul><pre><code class=language-yaml>shenyu:
client:
registerType: consul
props:
@@ -195,30 +199,30 @@ spring:
port: 8500
# registerType : 服务注册类型,填写 consul
# shenyu.client.props.port: 你本项目的启动端口,目前springmvc/tars/grpc需要进行填写
-# contextPath: 为你的这个mvc项目在shenyu网关的路由前缀,这个你应该懂意思把? 比如/order ,/product 等等,网关会根据你的这个前缀来进行路由.
+# contextPath: 为你的这个mvc项目在shenyu网关的路由前缀, 比如/order ,/product 等等,网关会根据你的这个前缀来进行路由.
# appName:你的应用名称,不配置的话,会默认取 `spring.application.name` 的值
# isFull: 设置true 代表代理你的整个服务,false表示代理你其中某几个controller;目前适用于springmvc
# instance-id: consul服务必填,consul需要通过instance-id找到具体服务
# service-name 服务注册到consul时所在的组名,不配置的话,会默认取 `spring.application.name` 的值
# host: 为 consul 注册类型时,填写 consul 地址,默认localhost
# spring.cloud.consul.port: 为 consul 注册类型时,填写 consul 端口, 默认是8500
-</code></pre><h2 id=nacos方式注册>Nacos方式注册</h2><h4 id=shenyu-admin配置-4>Shenyu-Admin配置</h4><ul><li>首先在 pom.xml 文件中加入相关的依赖(默认已经引入):</li></ul><pre><code class=language-xml> <dependency>
+</code></pre><p><img src=/img/shenyu/register/register-consul-client-yml.png width=70% height=60%></p><h3 id=nacos方式注册配置>Nacos方式注册配置</h3><h4 id=shenyu-admin配置-4>shenyu-admin配置</h4><ul><li>首先在 <code>pom</code> 文件中加入相关的依赖(默认已经引入):</li></ul><pre><code class=language-xml> <dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-register-server-nacos</artifactId>
<version>${project.version}</version>
</dependency>
-</code></pre><ul><li>在 application.yml 配置注册中心为nacos, 填写相关nacos服务地址和参数,还有Nacos的命名空间(需要和Shenyu-Client保持一致),如下:</li></ul><pre><code class=language-yaml>shenyu:
+</code></pre><p><img src=/img/shenyu/register/register-nacos-admin-pom.png width=70% height=60%></p><ul><li>然后在 <code>yml</code>文件中配置注册中心为<code>nacos</code>, 填写相关<code>nacos</code>服务地址和参数,还有<code>nacos</code>的命名空间(需要和<code>shenyu-client</code>保持一致),配置信息如下:</li></ul><pre><code class=language-yaml>shenyu:
register:
registerType: nacos
serverLists : localhost:8848
props:
nacosNameSpace: ShenyuRegisterCenter
-</code></pre><h4 id=shenyu-client配置-4>Shenyu-Client配置</h4><ul><li>首先在 pom.xml 文件中加入相关的依赖(默认已经引入):</li></ul><pre><code class=language-xml> <dependency>
+</code></pre><p><img src=/img/shenyu/register/register-nacos-admin-yml.png width=70% height=60%></p><h4 id=shenyu-client配置-4>shenyu-client配置</h4><p>下面展示的是<code>http</code>服务作为客户端接入到<code>ShenYu</code>网关时,通过<code>Nacos</code>方式注册配置信息。其他客户端接入时(<code>Dubbo</code>、 <code>Spring Cloud</code>等),配置方式同理。</p><ul><li>首先在 <code>pom</code>文件中加入相关的依赖:</li></ul><pre><code class=language-xml> <dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-register-client-nacos</artifactId>
<version>${project.version}</version>
</dependency>
-</code></pre><ul><li>在 application.yml 中配置注册方式为nacos, 并填写nacos服务地址和相关参数,需要命名空间(需要和Shenyu-Admin端保持一致),IP(可不填,则自动获取本机ip)和端口,如下:</li></ul><pre><code class=language-yaml>shenyu:
+</code></pre><p><img src=/img/shenyu/register/register-nacos-client-pom.png width=70% height=60%></p><ul><li>然后在 <code>yml</code> 中配置注册方式为<code>nacos</code>, 并填写<code>nacos</code>服务地址和相关参数,还需要<code>Nacos</code>命名空间(需要和<code>shenyu-admin</code>端保持一致),IP(可不填,则自动获取本机ip)和端口,配置信息如下:</li></ul><pre><code class=language-yaml>shenyu:
client:
registerType: nacos
serverLists: localhost:8848
@@ -231,11 +235,11 @@ spring:
# registerType : 服务注册类型,填写 etcd
# serverList: 为etcd注册类型时,填写etcd地址,多个地址用英文分隔
# port: 你本项目的启动端口,目前springmvc/tars/grpc需要进行填写
-# contextPath: 为你的这个mvc项目在shenyu网关的路由前缀,这个你应该懂意思把? 比如/order ,/product 等等,网关会根据你的这个前缀来进行路由.
+# contextPath: 为你的这个mvc项目在shenyu网关的路由前缀,比如/order ,/product 等等,网关会根据你的这个前缀来进行路由.
# appName:你的应用名称,不配置的话,会默认取 `spring.application.name` 的值
# isFull: 设置true 代表代理你的整个服务,false表示代理你其中某几个controller;目前适用于springmvc/springcloud
# nacosNameSpace: nacos的命名空间
-</code></pre></article></main></div><footer class=ss-footer><div class=container><div class=links><div class="cate -show-mobile"><h2 class=cate-title>Apache</h2><a class=link href=https://www.apache.org/>Foundation</a>
+</code></pre><p><img src=/img/shenyu/register/register-nacos-client-yml.png width=70% height=60%></p><p>总结,本文主要介绍了如何将你的微服务(当前支持<code>Http</code>、 <code>Dubbo</code>、 <code>Spring Cloud</code>、 <code>gRPC</code>、 <code>Motan</code>、 <code>Sofa</code>、 <code>Tars</code>等协议)接入到<code>ShenYu</code>网关。介绍了注册中心的原理,<code>ShenYu</code>网关支持的注册中心有<code>Http</code>、<code>Zookeeper</code>、<code>Etcd</code>、<code>Consul</code>、<code>Nacos</code>等方式。还介绍了以<code>http</code>服务作为客户端接入到<code>ShenYu</code>网关时 [...]
<a class=link href=https://github.com/apache/incubator-shenyu/issues>GitHub Issue Tracker</a>
<a class=link href=https://www.apache.org/licenses/>License</a>
<a class=link href=https://www.apache.org/security/>Security</a>
diff --git a/zh/sitemap.xml b/zh/sitemap.xml
index ed92b2c..ccbd5a4 100644
--- a/zh/sitemap.xml
+++ b/zh/sitemap.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>/zh/projects/shenyu/</loc><lastmod>2021-07-10T19:56:14+08:00</lastmod><changefreq>monthly</changefreq><priority>0.5</priority><xhtml:link rel="alternate" hreflang="en" href="/projects/shenyu/"/><xhtml:link rel="alternate" hreflang="zh" href="/zh/projects/shenyu/"/></url><url><loc>/zh/projects/shenyu-2.3.0/</loc><lastmod>20 [...]
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>/zh/projects/shenyu/</loc><lastmod>2021-07-10T19:56:55+08:00</lastmod><changefreq>monthly</changefreq><priority>0.5</priority><xhtml:link rel="alternate" hreflang="en" href="/projects/shenyu/"/><xhtml:link rel="alternate" hreflang="zh" href="/zh/projects/shenyu/"/></url><url><loc>/zh/projects/shenyu-2.3.0/</loc><lastmod>20 [...]
\ No newline at end of file