blob: 0b0701512fc6b16572a23df1e3f165158b0bd7a2 [file] [log] [blame]
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Apache Dubbo – 文档 2.x</title><link>https://dubbo.apache.org/zh-cn/docsv2.7/</link><description>Recent content in 文档 2.x on Apache Dubbo</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><atom:link href="https://dubbo.apache.org/zh-cn/docsv2.7/index.xml" rel="self" type="application/rss+xml"/><item><title>Docsv2.7:</title><link>https://dubbo.apache.org/zh-cn/docsv2.7/dev/impls/page/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dubbo.apache.org/zh-cn/docsv2.7/dev/impls/page/</guid><description>
&lt;h1 id="页面扩展">页面扩展&lt;/h1>
&lt;h2 id="扩展说明">扩展说明&lt;/h2>
&lt;p>对等网络节点组网器。&lt;/p>
&lt;h2 id="扩展接口">扩展接口&lt;/h2>
&lt;p>&lt;code>org.apache.dubbo.container.page.PageHandler&lt;/code>&lt;/p>
&lt;h2 id="扩展配置">扩展配置&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">&amp;lt;dubbo:protocol&lt;/span> page=&lt;span style="color:#2aa198">&amp;#34;xxx,yyy&amp;#34;&lt;/span> &lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&amp;lt;!-- 缺省值设置,当&amp;lt;dubbo:protocol&amp;gt;没有配置page属性时,使用此配置 --&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">&amp;lt;dubbo:provider&lt;/span> page=&lt;span style="color:#2aa198">&amp;#34;xxx,yyy&amp;#34;&lt;/span> &lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="已知扩展">已知扩展&lt;/h2>
&lt;ul>
&lt;li>&lt;code>org.apache.dubbo.container.page.pages.HomePageHandler&lt;/code>&lt;/li>
&lt;li>&lt;code>org.apache.dubbo.container.page.pages.StatusPageHandler&lt;/code>&lt;/li>
&lt;li>&lt;code>org.apache.dubbo.container.page.pages.LogPageHandler&lt;/code>&lt;/li>
&lt;li>&lt;code>org.apache.dubbo.container.page.pages.SystemPageHandler&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="扩展示例">扩展示例&lt;/h2>
&lt;p>Maven 项目结构:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>src
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> |-main
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> |-java
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> |-com
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> |-xxx
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> |-XxxPageHandler.java (实现PageHandler接口)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> |-resources
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> |-META-INF
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> |-dubbo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> |-org.apache.dubbo.container.page.PageHandler (纯文本文件,内容为:xxx=com.xxx.XxxPageHandler)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>XxxPageHandler.java:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">package&lt;/span> com.xxx;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.container.page.PageHandler;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">class&lt;/span> &lt;span style="color:#268bd2">XxxPageHandler&lt;/span> &lt;span style="color:#268bd2">implements&lt;/span> PageHandler {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">public&lt;/span> Group &lt;span style="color:#268bd2">lookup&lt;/span>(URL url) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// ...&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>META-INF/dubbo/org.apache.dubbo.container.page.PageHandler:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span>xxx&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">com.xxx.XxxPageHandler&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docsv2.7:</title><link>https://dubbo.apache.org/zh-cn/docsv2.7/dev/principals/introduction/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dubbo.apache.org/zh-cn/docsv2.7/dev/principals/introduction/</guid><description>
&lt;h1 id="设计原则">设计原则&lt;/h1>
&lt;p>本章节的设计原则摘录自梁飞在 javaeye 上发表的系列文章。&lt;/p></description></item><item><title>Docsv2.7:</title><link>https://dubbo.apache.org/zh-cn/docsv2.7/user/examples/auth/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dubbo.apache.org/zh-cn/docsv2.7/user/examples/auth/</guid><description>
&lt;h1 id="服务鉴权">服务鉴权&lt;/h1>
&lt;p>类似支付之类的对安全性敏感的业务可能会有限制匿名调用的需求。在加固安全性方面,2.7.5 引入了基于AK/SK机制的认证鉴权机制,并且引入了鉴权服务中心,主要原理是消费端在请求需要鉴权的服务时,会通过SK、请求元数据、时间戳、参数等信息来生成对应的请求签名,通过Dubbo的Attahcment机制携带到对端进行验签,验签通过才进行业务逻辑处理。如下图所示:&lt;/p>
&lt;p>&lt;img src="https://dubbo.apache.org/imgs/docsv2.7/user/examples/auth/auth.png" alt="img">&lt;/p>
&lt;p>具体的接入方式也并不复杂:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>使用者需要在微服务站点上填写自己的应用信息,并为该应用生成唯一的证书凭证。&lt;/p>
&lt;/li>
&lt;li>
&lt;p>之后在管理站点上提交工单,申请某个敏感业务服务的使用权限,并由对应业务管理者进行审批,审批通过之后,会生成对应的AK/SK到鉴权服务中心。&lt;/p>
&lt;/li>
&lt;li>
&lt;p>导入该证书到对应的应用下,并且进行配置。配置方式也十分简单,以注解方式为例:&lt;/p>
&lt;p>服务提供端,只需要设置&lt;code>service.auth&lt;/code>为true,表示该服务的调用需要鉴权认证通过。&lt;code>param.sign&lt;/code>为&lt;code>true&lt;/code>表示需要对参数也进行校验。&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">@Service&lt;/span>(parameters &lt;span style="color:#719e07">=&lt;/span> {&lt;span style="color:#2aa198">&amp;#34;service.auth&amp;#34;&lt;/span>,&lt;span style="color:#2aa198">&amp;#34;true&amp;#34;&lt;/span>,&lt;span style="color:#2aa198">&amp;#34;param.sign&amp;#34;&lt;/span>,&lt;span style="color:#2aa198">&amp;#34;true&amp;#34;&lt;/span>})
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">class&lt;/span> &lt;span style="color:#268bd2">AuthDemoServiceImpl&lt;/span> &lt;span style="color:#268bd2">implements&lt;/span> AuthService {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>服务消费端,只需要配置好对应的证书等信息即可,之后会自动地在对这些需要认证的接口发起调用前进行签名操作,通过与鉴权服务的交互,用户无需在代码中配置AK/SK这些敏感信息,并且在不重启应用的情况下刷新AK/SK,达到权限动态下发的目的。&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>该方案目前已经提交给Dubbo开源社区,并且完成了基本框架的合并,除了AK/SK的鉴权方式之外,通过SPI机制支持用户可定制化的鉴权认证以及适配公司内部基础设施的密钥存储。&lt;/p></description></item><item><title>Docsv2.7:</title><link>https://dubbo.apache.org/zh-cn/docsv2.7/user/new-features-in-a-glance/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dubbo.apache.org/zh-cn/docsv2.7/user/new-features-in-a-glance/</guid><description>
&lt;h1 id="dubbo-版本发布及新特性速览">Dubbo 版本发布及新特性速览&lt;/h1>
&lt;h2 id="版本速览">版本速览&lt;/h2>
&lt;p>Dubbo 社区目前主力维护的有 2.6.x 和 2.7.x 两大版本,其中,&lt;/p>
&lt;ul>
&lt;li>2.6.x 主要以 bugfix 和少量 enhancements 为主,因此能完全保证稳定性&lt;/li>
&lt;li>2.7.x 作为社区的主要开发版本,得到持续更新并增加了大量新 feature 和优化,同时也带来了一些稳定性挑战&lt;/li>
&lt;/ul>
&lt;h3 id="27x-版本">2.7.x 版本&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>&lt;/th>
&lt;th>版本&lt;/th>
&lt;th>重要功能&lt;/th>
&lt;th>升级建议&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>1&lt;/td>
&lt;td>2.7.6&lt;/td>
&lt;td>bugfix of 2.7.5&lt;br /> 服务鉴权&lt;/td>
&lt;td>&lt;strong>推荐生产使用&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2&lt;/td>
&lt;td>2.7.5&lt;/td>
&lt;td>服务自省&lt;br />HTTP/2(gRPC) &lt;br />Protobuf &lt;br />TLS&lt;br />性能优化&lt;br />&lt;br />&lt;a href="https://github.com/apache/dubbo/releases/tag/dubbo-2.7.5">https://github.com/apache/dubbo/releases/tag/dubbo-2.7.5&lt;/a>&lt;/td>
&lt;td>不建议大规模生产使用&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>3&lt;/td>
&lt;td>2.7.4.1&lt;/td>
&lt;td>&lt;a href="https://github.com/apache/dubbo/releases/tag/dubbo-2.7.4.1">bugfixes and enhancements of 2.7.3&lt;/a>&lt;/td>
&lt;td>&lt;strong>推荐生产使用&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>4&lt;/td>
&lt;td>2.7.3&lt;/td>
&lt;td>&lt;a href="https://github.com/apache/dubbo/releases/tag/dubbo-2.7.3">bigfixes of and enhancements of 2.7.2&lt;/a>&lt;/td>
&lt;td>&lt;strong>推荐生产使用&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>5&lt;/td>
&lt;td>2.7.2&lt;/td>
&lt;td>&lt;a href="https://github.com/apache/dubbo/releases/tag/dubbo-2.7.2">bigfixes of and enhancements of 2.7.1&lt;/a>&lt;/td>
&lt;td>不建议大规模生产使用&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>6&lt;/td>
&lt;td>2.7.1&lt;/td>
&lt;td>&lt;a href="https://github.com/apache/dubbo/releases/tag/dubbo-2.7.1">bigfixes of and enhancements of 2.7.0&lt;/a>&lt;/td>
&lt;td>不建议大规模生产使用&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>7&lt;/td>
&lt;td>2.7.0&lt;/td>
&lt;td>异步编程模型 - 消费端/提供端异步&lt;br />服务治理规则增强&lt;br />简化的注册模型&lt;br />配置中心、元数据中心&lt;br />package 重构&lt;br />&lt;br />&lt;a href="https://github.com/apache/dubbo/releases/tag/dubbo-2.7.0">https://github.com/apache/dubbo/releases/tag/dubbo-2.7.0&lt;/a>&lt;/td>
&lt;td>beta 版本,2.6.x 重构后首个版本&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="26x-及之前版本">2.6.x 及之前版本&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>&lt;/th>
&lt;th>版本&lt;/th>
&lt;th>重要功能&lt;/th>
&lt;th>升级建议&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>1&lt;/td>
&lt;td>2.6.x&lt;/td>
&lt;td>bugfix&lt;/td>
&lt;td>建议持续升级最新版本,所有版本生产可用&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2&lt;/td>
&lt;td>2.5.x&lt;/td>
&lt;td>停止维护&lt;/td>
&lt;td>建议升级最新 2.6.x 版本&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>3&lt;/td>
&lt;td>2.4.x 及之前&lt;/td>
&lt;td>停止维护&lt;/td>
&lt;td>建议升级最新 2.6.x 版本&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="值得关注的新特性">值得关注的新特性&lt;/h2>
&lt;ul>
&lt;li>Dubbo 云原生计划(敬请期待&amp;hellip;)&lt;/li>
&lt;li>Kubernetes Native Service Discovery(敬请期待&amp;hellip;)&lt;/li>
&lt;li>&lt;a href="../references/protocol/grpc/">gRPC (HTTP/2) 协议&lt;/a>&lt;/li>
&lt;li>&lt;a href="../examples/protobuf-idl/">使用 Protobuf 定义 Dubbo 服务&lt;/a>&lt;/li>
&lt;li>&lt;a href="../examples/tls/">TLS 安全传输&lt;/a>&lt;/li>
&lt;li>实例级服务发现&lt;/li>
&lt;li>&lt;a href="../examples/auth/">服务鉴权&lt;/a>&lt;/li>
&lt;li>性能优化
&lt;ul>
&lt;li>&lt;a href="https://dubbo.apache.org/zh-cn/blog/2020/05/18/dubbo-java-2.7.5-%E5%8A%9F%E8%83%BD%E8%A7%A3%E6%9E%90/">调用链路提升 30%&lt;/a>&lt;/li>
&lt;li>&lt;a href="../examples/consumer-threadpool/">消费端线程模型&lt;/a>&lt;/li>
&lt;li>地址推送链路&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h2 id="热门文章列表">热门文章列表&lt;/h2>
&lt;p>&lt;a href="https://dubbo.apache.org/zh-cn/blog/2020/05/11/%E4%BB%8E-2019-%E5%88%B0-2020apache-dubbo-%E5%B9%B4%E5%BA%A6%E5%9B%9E%E9%A1%BE%E4%B8%8E%E6%80%BB%E7%BB%93/">从 2019 到 2020,Apache Dubbo 年度总结&lt;/a>&lt;br>
&lt;a href="https://dubbo.apache.org/zh-cn/blog/2020/05/18/dubbo-java-2.7.5-%E5%8A%9F%E8%83%BD%E8%A7%A3%E6%9E%90/">Dubbo 2.7.5 里程碑版本发布&lt;/a>&lt;br>
&lt;a href="https://dubbo.apache.org/zh-cn/blog/2019/10/28/dubbo-%E5%9C%A8%E8%B7%A8%E8%AF%AD%E8%A8%80%E5%92%8C%E5%8D%8F%E8%AE%AE%E7%A9%BF%E9%80%8F%E6%80%A7%E6%96%B9%E5%90%91%E4%B8%8A%E7%9A%84%E6%8E%A2%E7%B4%A2%E6%94%AF%E6%8C%81-http/2-grpc-%E5%92%8C-protobuf/">Dubbo 在协议与多语言方向的探索:支持 gRPC、Protobuf&lt;/a>&lt;/p></description></item></channel></rss>