You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2019/02/12 10:18:16 UTC

[incubator-dubbo-website] branch asf-site updated: Add config-center schema doc

This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 583aee5  Add config-center schema doc
     new f2c71d9  Merge remote-tracking branch 'official/asf-site' into local/apache/asf-site
583aee5 is described below

commit 583aee5ac068d4a456d8f8f02acd4b5e47903120
Author: ken.lj <ke...@gmail.com>
AuthorDate: Tue Feb 12 18:15:09 2019 +0800

    Add config-center schema doc
---
 docs/zh-cn/user/SUMMARY.md                         |  1 +
 .../user/references/xml/dubbo-config-center.md     | 64 ++++++++++++++++++++++
 site_config/docs.js                                |  4 ++
 3 files changed, 69 insertions(+)

diff --git a/docs/zh-cn/user/SUMMARY.md b/docs/zh-cn/user/SUMMARY.md
index 1b28028..481409c 100644
--- a/docs/zh-cn/user/SUMMARY.md
+++ b/docs/zh-cn/user/SUMMARY.md
@@ -74,6 +74,7 @@
     * [8.10 dubbo:method](./references/xml/dubbo-method.md)
     * [8.11 dubbo:argument](./references/xml/dubbo-argument.md)
     * [8.12 dubbo:parameter](./references/xml/dubbo-parameter.md)
+    * [8.13 dubbo:config-center](./references/xml/dubbo-config-center.md)
 * [9 协议参考手册](./references/protocol/introduction.md)
     * [9.1 dubbo://](./references/protocol/dubbo.md)
     * [9.2 rmi//](./references/protocol/rmi.md)
diff --git a/docs/zh-cn/user/references/xml/dubbo-config-center.md b/docs/zh-cn/user/references/xml/dubbo-config-center.md
new file mode 100644
index 0000000..1c0f0be
--- /dev/null
+++ b/docs/zh-cn/user/references/xml/dubbo-config-center.md
@@ -0,0 +1,64 @@
+<style>
+table {
+  width: 100%;
+  max-width: 65em;
+  border: 1px solid #dedede;
+  margin: 15px auto;
+  border-collapse: collapse;
+  empty-cells: show;
+}
+table th,
+table td {
+  height: 35px;
+  border: 1px solid #dedede;
+  padding: 0 10px;
+}
+table th {
+  font-weight: bold;
+  text-align: center !important;
+  background: rgba(158,188,226,0.2);
+  white-space: nowrap;
+}
+table tbody tr:nth-child(2n) {
+  background: rgba(158,188,226,0.12);
+}
+table td:nth-child(1) {
+  white-space: nowrap;
+}
+table tr:hover {
+  background: #efefef;
+}
+.table-area {
+  overflow: auto;
+}
+</style>
+
+<script type="text/javascript">
+[].slice.call(document.querySelectorAll('table')).forEach(function(el){
+    var wrapper = document.createElement('div');
+    wrapper.className = 'table-area';
+    el.parentNode.insertBefore(wrapper, el);
+    el.parentNode.removeChild(el);
+    wrapper.appendChild(el);
+})
+</script>
+# dubbo:config-center
+
+配置中心。对应的配置类:`org.apache.dubbo.config.ConfigCenterConfig`
+
+| 属性             | 对应URL参数            | 类型                | 是否必填 | 缺省值           | 描述                                                         | 兼容性 |
+| ---------------- | ---------------------- | ------------------- | -------- | ---------------- | ------------------------------------------------------------ | ------ |
+| protocol         | config.protocol        | string              | 可选     | zookeeper        | 使用哪个配置中心:apollo、zookeeper、nacos等。<br />以zookeeper为例<br />1. 指定protocol,则address可以简化为`127.0.0.1:2181`;<br />2. 不指定protocol,则address取值为`zookeeper://127.0.0.1:2181` | 2.7.0+ |
+| address          | config.address         | string              | 必填     |                  | 配置中心地址。<br />取值参见protocol说明                     | 2.7.0+ |
+| highestPriority  | config.highestPriority | boolean             | 可选     | true             | 来自配置中心的配置项具有最高优先级,即会覆盖本地配置项。     | 2.7.0+ |
+| namespace        | config.namespace       | string              | 可选     | dubbo            | 通常用于多租户隔离,实际含义视具体配置中心而不同。<br />如:<br />zookeeper - 环境隔离,默认值`dubbo`;<br />apollo - 区分不同领域的配置集合,默认使用`dubbo`和`application` | 2.7.0+ |
+| cluster          | config.cluster         | string              | 可选     |                  | 含义视所选定的配置中心而不同。<br />如Apollo中用来区分不同的配置集群 | 2.7.0+ |
+| group            | config.group           | string              | 可选     | dubbo            | 含义视所选定的配置中心而不同。<br />nacos - 隔离不同配置集<br />zookeeper - 隔离不同配置集 | 2.7.0+ |
+| check            | config.check           | boolean             | 可选     | true             | 当配置中心连接失败时,是否终止应用启动。                     | 2.7.0+ |
+| configFile       | config.configFile      | string              | 可选     | dubbo.properties | 全局级配置文件所映射到的key<br />zookeeper - 默认路径/dubbo/config/dubbo/dubbo.properties<br />apollo - dubbo namespace中的dubbo.properties键 | 2.7.0+ |
+| appConfigFile    | config.appConfigFile   | string              |          | dubbo.properties | 应用级配置文件所映射的key                                    | 2.7.0+ |
+| timeout          | config.timeout         | integer             |          | 3000ms           | 获取配置的超时时间                                           | 2.7.0+ |
+| username         |                        | string              |          |                  | 如果配置中心需要做校验,用户名<br />Apollo暂未启用           | 2.7.0+ |
+| password         |                        | string              |          |                  | 如果配置中心需要做校验,密码<br />Apollo暂未启用             | 2.7.0+ |
+| parameters       |                        | Map<string, string> |          |                  | 扩展参数,用来支持不同配置中心的定制化配置参数               | 2.7.0+ |
+| includeSpringEnv |                        | boolean             | 可选     | false            | 使用Spring框架时支持,为true时,会自动从Spring Environment中读取配置。<br />默认依次读取<br />key为dubbo.properties的配置<br />key为dubbo.properties的PropertySource | 2.7.0+ |
\ No newline at end of file
diff --git a/site_config/docs.js b/site_config/docs.js
index 11345cd..fd70a2f 100644
--- a/site_config/docs.js
+++ b/site_config/docs.js
@@ -933,6 +933,10 @@ export default {
                                 title: 'dubbo:parameter',
                                 link: '/zh-cn/docs/user/references/xml/dubbo-parameter.html',
                             },
+                            {
+                                title: 'dubbo:config-center',
+                                link: '/zh-cn/docs/user/references/xml/dubbo-config-center.html',
+                            },
                         ]
                     },
                     {