This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch cn-site
in repository https://gitbox.apache.org/repos/asf/dubbo-website.git
The following commit(s) were added to refs/heads/cn-site by this push:
new ea89b090d3 deploy: 3df94cb891399d1edcc6906f3fcb47c324ec9be3
ea89b090d3 is described below
commit ea89b090d396ad22894e56e3b1846abf3aeda7b4
Author: AlbumenJ <[email protected]>
AuthorDate: Thu Feb 23 12:15:35 2023 +0000
deploy: 3df94cb891399d1edcc6906f3fcb47c324ec9be3
---
sitemap.xml | 2 +-
zh-cn/docsv2.7/user/examples/index.xml | 1 +
zh-cn/docsv2.7/user/examples/set-host/index.html | 8 ++++----
zh-cn/sitemap.xml | 2 +-
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/sitemap.xml b/sitemap.xml
index 0b0b902eff..cac52596ba 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>https://cn.dubbo.apache.org/zh-cn/sitemap.xml</loc><lastmod>2023-02-23T20:10:28+08:00</lastmod></sitemap><sitemap><loc>https://cn.dubbo.apache.org/en/sitemap.xml</loc><lastmod>2023-02-23T11:00:42+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>https://cn.dubbo.apache.org/zh-cn/sitemap.xml</loc><lastmod>2023-02-23T20:11:08+08:00</lastmod></sitemap><sitemap><loc>https://cn.dubbo.apache.org/en/sitemap.xml</loc><lastmod>2023-02-23T11:00:42+08:00</lastmod></sitemap></sitemapindex>
\ No newline at end of file
diff --git a/zh-cn/docsv2.7/user/examples/index.xml
b/zh-cn/docsv2.7/user/examples/index.xml
index 5a3575a4ab..14bec08363 100644
--- a/zh-cn/docsv2.7/user/examples/index.xml
+++ b/zh-cn/docsv2.7/user/examples/index.xml
@@ -2557,6 +2557,7 @@ Dubbo 从 <code>2.2.0</code> 每个服务默认都会在本地暴露,无
<li>那在<code>dubbo</code>中如何指定服务的<code>host</code>,我们是否可以用hostname或domain代替IP地址作为<code>host</code>?</li>
<li>在使用docker时,有时需要设置端口映射,此时,启动server时绑定的socket和向注册中心注册的socket使用不同的端口号,此时又该如何设置?</li>
</ol>
+<h2 id="示例">示例</h2>
<h4 id="dubbo-中不设置-host-时默认-host-是什么">dubbo 中不设置 host 时默认 host 是什么</h4>
<p>一般的 dubbo 协议配置如下:</p>
<div class="highlight"><pre tabindex="0"
style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code
class="language-xml" data-lang="xml"><span style="display:flex;"><span>
...
diff --git a/zh-cn/docsv2.7/user/examples/set-host/index.html
b/zh-cn/docsv2.7/user/examples/set-host/index.html
index 14c94b260b..901f04c206 100644
--- a/zh-cn/docsv2.7/user/examples/set-host/index.html
+++ b/zh-cn/docsv2.7/user/examples/set-host/index.html
@@ -1,8 +1,8 @@
-<!doctype html><html lang=zh-cn class=no-js><head><meta name=ROBOTS
content="INDEX, FOLLOW"><link rel=canonical
href=https://cn.dubbo.apache.org/zh-cn/docsv2.7/user/examples/set-host/><script>var
_hmt=_hmt||[];(function(){var
e,t=document.createElement("script");t.src="https://hm.baidu.com/hm.js?3b78f49ba47181e4d998a66b689446e9",e=document.getElementsByTagName("script")[0],e.parentNode.insertBefore(t,e)})()</script><meta
charset=utf-8><meta name=viewport content="width=device-width,initi [...]
+<!doctype html><html lang=zh-cn class=no-js><head><meta name=ROBOTS
content="INDEX, FOLLOW"><link rel=canonical
href=https://cn.dubbo.apache.org/zh-cn/docsv2.7/user/examples/set-host/><script>var
_hmt=_hmt||[];(function(){var
e,t=document.createElement("script");t.src="https://hm.baidu.com/hm.js?3b78f49ba47181e4d998a66b689446e9",e=document.getElementsByTagName("script")[0],e.parentNode.insertBefore(t,e)})()</script><meta
charset=utf-8><meta name=viewport content="width=device-width,initi [...]
<link rel=preload
href=/scss/main.min.926378f2234eb1a2b24add8856e8dcfd9d7e1705d4f7faba9fa03fb33a98e04e.css
as=style><link
href=/scss/main.min.926378f2234eb1a2b24add8856e8dcfd9d7e1705d4f7faba9fa03fb33a98e04e.css
rel=stylesheet integrity><script src=/js/jquery-3.5.1.min.js
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
crossorigin=anonymous></script>
<link rel=stylesheet href=https://cdn.jsdelivr.net/npm/@docsearch/css@3><meta
name=theme-color content="#326ce5"><link rel=stylesheet
href=/css/feature-states.css><meta name=description content="自定义 Dubbo
服务对外暴露的主机地址"><meta property="og:description" content="自定义 Dubbo
服务对外暴露的主机地址"><meta name=twitter:description content="自定义 Dubbo
服务对外暴露的主机地址"><meta property="og:url"
content="https://cn.dubbo.apache.org/zh-cn/docsv2.7/user/examples/set-host/"><meta
property="og:title" content="主机配置"><meta [...]
<link href=/css/community.css rel=stylesheet><link href=/css/contactus.css
rel=stylesheet><script src=/js/script.js></script></head><body class="td-page
td-documentation"><header><nav class="js-navbar-scroll navbar navbar-expand
navbar-dark flex-column flex-md-row td-navbar" data-auto-burger=primary><a
class=navbar-brand href=/zh-cn/><span class=navbar-logo></span><span
class="text-uppercase font-weight-bold">Apache Dubbo</span></a><div
class="td-navbar-nav-scroll ml-md-auto" id=main_nav [...]
-<a href=#>Apache Dubbo 全新改版网站与文档</a> <em>正式上线!</em></h4><p>新版文档仍处于持续完善中,将涵盖
Dubbo3
及最新特性使用方式,我们计划在未来几个月内为用户提供最完善、易用的使用体验!<br>2023-02-21.</p></div></aside></div></header><div
class="container-fluid td-outer"><div class=td-main><div class="row
flex-md-nowrap"><div class="col-12 col-md-3 col-xl-2 td-sidebar
d-print-none"><div id=td-sidebar-menu class=td-sidebar__inner><div
id=content-mobile><form class="td-sidebar__search d-flex
align-items-center"><div id=docsearch></div><button class="btn [...]
+<a href=#>Apache Dubbo 全新改版网站与文档</a> <em>正式上线!</em></h4><p>新版文档仍处于持续完善中,将涵盖
Dubbo3
及最新特性使用方式,我们计划在未来几个月内为用户提供最完善、易用的使用体验!<br>2023-02-21.</p></div></aside></div></header><div
class="container-fluid td-outer"><div class=td-main><div class="row
flex-md-nowrap"><div class="col-12 col-md-3 col-xl-2 td-sidebar
d-print-none"><div id=td-sidebar-menu class=td-sidebar__inner><div
id=content-mobile><form class="td-sidebar__search d-flex
align-items-center"><div id=docsearch></div><button class="btn [...]
</span></span><span style=display:flex><span> <span
style=color:#268bd2><dubbo:protocol</span> name=<span
style=color:#2aa198>"dubbo"</span> port=<span
style=color:#2aa198>"20890"</span> <span
style=color:#268bd2>/></span>
</span></span><span style=display:flex><span> ...
</span></span></code></pre></div><p>可以看到,只配置了端口号,没有配置 host,此时设置的 host
又是什么呢?</p><p>查看代码发现,在
<code>org.apache.dubbo.config.ServiceConfig#findConfigedHosts()</code> 中,通过
<code>InetAddress.getLocalHost().getHostAddress()</code> 获取默认
host。其返回值如下:</p><ol><li>未联网时,返回 127.0.0.1</li><li>在阿里云服务器中,返回私有地址,如:
172.18.46.234</li><li>在本机测试时,返回公有地址,如: 30.5.10.11</li></ol><h4
id=那在-dubbo-中如何指定服务的-socket>那在 dubbo 中如何指定服务的 socket?</h4><p>除此之外,可以通过
<code>dubbo.protocol</code> 或 <code>dubbo.provider </code>的 [...]
@@ -10,10 +10,10 @@
</span></span><span style=display:flex><span> ...
</span></span></code></pre></div><h4
id=在使用-docker-时有时需要设置端口映射此时启动-server-时绑定的-socket-和向注册中心注册的-socket-使用不同的端口号此时又该如何设置>在使用
docker 时,有时需要设置端口映射,此时,启动 server 时绑定的 socket 和向注册中心注册的 socket
使用不同的端口号,此时又该如何设置?</h4><p>见 <a
href=https://github.com/dubbo/dubbo-samples/tree/master/2-advanced/dubbo-samples-docker>dubbo
通过环境变量设置 host</a></p><p>有些部署场景需要动态指定服务注册的地址,如 docker bridge 网络模式下要指定注册宿主机 ip
以实现外网通信。dubbo
提供了两对启动阶段的系统属性,用于设置对外通信的ip、port地址。</p><ul><li><strong>DUBBO_IP_TO_REGISTRY</strong>:注册到注册中
[...]
dubbo 支持多协议,如果一个应用同时暴露多个不同协议服务,且需要为每个服务单独指定 ip 或 port,请分别在以上属性前加协议前缀。
如:</p><ul><li><strong>HESSIAN_DUBBO_PORT_TO_BIND</strong>:hessian 协议绑定的
port</li><li><strong>DUBBO_DUBBO_PORT_TO_BIND</strong>:dubbo 协议绑定的
port</li><li><strong>HESSIAN_DUBBO_IP_TO_REGISTRY</strong>:hessian 协议注册的
ip</li><li><strong>DUBBO_DUBBO_IP_TO_REGISTRY</strong>:dubbo 协议注册的
ip</li></ul><p>PORT_TO_REGISTRY 或 IP_TO_REGISTRY 不会用作默认 PORT_TO_BIND 或
IP_TO_BIND,但是反过来是成立的。如:</p><ul><li>设置 <code>PORT_TO_REGISTRY=20881</code [...]
-<button class="btn btn-primary mb-4
feedback--no">否</button></div><script>const
yes=document.querySelector(".feedback--yes"),no=document.querySelector(".feedback--no");document.querySelectorAll(".feedback--link").forEach(e=>{e.href=e.href+window.location.pathname});const
sendFeedback=e=>{gtag||console.log("!gtag"),gtag("event","click",{event_category:"Helpful",event_label:window.location.pathname,value:e})},disableButtons=()=>{yes.disabled=!0,yes.classList.add("feedback--button__disabled
[...]
+<button class="btn btn-primary mb-4
feedback--no">否</button></div><script>const
yes=document.querySelector(".feedback--yes"),no=document.querySelector(".feedback--no");document.querySelectorAll(".feedback--link").forEach(e=>{e.href=e.href+window.location.pathname});const
sendFeedback=e=>{gtag||console.log("!gtag"),gtag("event","click",{event_category:"Helpful",event_label:window.location.pathname,value:e})},disableButtons=()=>{yes.disabled=!0,yes.classList.add("feedback--button__disabled
[...]
<a
href="https://github.com/apache/dubbo-website/new/master/content/zh-cn/docsv2.7/user/examples/set-host.md?filename=change-me.md&value=---%0Atitle%3A+%22Long+Page+Title%22%0AlinkTitle%3A+%22Short+Nav+Title%22%0Aweight%3A+100%0Adescription%3A+%3E-%0A+++++Page+description+for+heading+and+indexes.%0A---%0A%0A%23%23+Heading%0A%0AEdit+this+template+to+create+your+new+page.%0A%0A%2A+Give+it+a+good+name%2C+ending+in+%60.md%60+-+e.g.+%60getting-started.md%60%0A%2A+Edit+the+%22front+matter%22+s
[...]
<a
href="https://github.com/apache/dubbo-website/issues/new?title=%e4%b8%bb%e6%9c%ba%e9%85%8d%e7%bd%ae"
target=_blank><i class="fab fa-github fa-fw"></i> 登记问题</a>
-<a href=https://github.com/apache/dubbo/issues/new target=_blank><i class="fas
fa-tasks fa-fw"></i> 提交项目问题</a></div><nav id=TableOfContents><ul><li><a
href=#背景>背景</a><ul><li></li></ul></li><li><a href=#总结>总结</a></li><li><a
href=#参考>参考</a></li></ul></nav></div></div></div></div><footer class="bg-dark
py-5 row d-print-none"><div class="container-fluid mx-sm-5"><div class=row><div
class="col-6 col-sm-4 text-xs-center order-sm-2"><ul class="list-inline
mb-0"><li class="list-inline-item mx-2 [...]
+<a href=https://github.com/apache/dubbo/issues/new target=_blank><i class="fas
fa-tasks fa-fw"></i> 提交项目问题</a></div><nav id=TableOfContents><ul><li><a
href=#背景>背景</a></li><li><a href=#示例>示例</a><ul><li></li></ul></li><li><a
href=#总结>总结</a></li><li><a
href=#参考>参考</a></li></ul></nav></div></div></div></div><footer class="bg-dark
py-5 row d-print-none"><div class="container-fluid mx-sm-5"><div class=row><div
class="col-6 col-sm-4 text-xs-center order-sm-2"><ul class="list-inline
mb-0"><li cl [...]
<script src=/js/bootstrap.min.js
integrity=sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy
crossorigin=anonymous></script>
<script
src=/js/main.min.5d9bbf645e25d374ae8412eedf48df17eb2fa1f70fe6cb544c730a1d145d7bd1.js
integrity="sha256-XZu/ZF4l03SuhBLu30jfF+svofcP5stUTHMKHRRde9E="
crossorigin=anonymous></script>
<script src=https://cdn.jsdelivr.net/npm/@docsearch/js@3></script>
diff --git a/zh-cn/sitemap.xml b/zh-cn/sitemap.xml
index b427bc8ddf..1466c90377 100644
--- a/zh-cn/sitemap.xml
+++ b/zh-cn/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>https://cn.dubbo.apache.org/zh-cn/blog/2023/01/16/%E9%98%BF%E9%87%8C%E5%B7%B4%E5%B7%B4%E5%8D%87%E7%BA%A7-dubbo3-%E5%85%A8%E9%9D%A2%E5%8F%96%E4%BB%A3-hsf2/</loc><lastmod>2023-02-22T15:03:22+08:00</lastmod><changefreq>monthly</changefreq><priority>0.5</priority></url><url><loc>https://cn.dubbo.apache.org/zh-cn/docs3-v2/java-
[...]
\ 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>https://cn.dubbo.apache.org/zh-cn/blog/2023/01/16/%E9%98%BF%E9%87%8C%E5%B7%B4%E5%B7%B4%E5%8D%87%E7%BA%A7-dubbo3-%E5%85%A8%E9%9D%A2%E5%8F%96%E4%BB%A3-hsf2/</loc><lastmod>2023-02-22T15:03:22+08:00</lastmod><changefreq>monthly</changefreq><priority>0.5</priority></url><url><loc>https://cn.dubbo.apache.org/zh-cn/docs3-v2/java-
[...]
\ No newline at end of file