You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2022/07/11 01:39:59 UTC

[dubbo-website] branch master updated: [fix] 优化 thrift 协议 (#1207)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 7f4d4f1227 [fix] 优化 thrift 协议 (#1207)
7f4d4f1227 is described below

commit 7f4d4f1227adee49b565cea43135c38c889d8063
Author: JIAN ZHONG <11...@qq.com>
AuthorDate: Mon Jul 11 09:39:54 2022 +0800

    [fix] 优化 thrift 协议 (#1207)
---
 .../reference-manual/protocol/thrift/guide.md      | 29 ++++++++--------------
 1 file changed, 10 insertions(+), 19 deletions(-)

diff --git a/content/zh/docs3-building/java-sdk/reference-manual/protocol/thrift/guide.md b/content/zh/docs3-building/java-sdk/reference-manual/protocol/thrift/guide.md
index 264112e792..24cb97e79e 100644
--- a/content/zh/docs3-building/java-sdk/reference-manual/protocol/thrift/guide.md
+++ b/content/zh/docs3-building/java-sdk/reference-manual/protocol/thrift/guide.md
@@ -4,19 +4,17 @@ title: "使用说明"
 linkTitle: "使用说明"
 weight: 2
 ---
+## 特性说明
+当前 dubbo 支持的 thrift 协议是对 thrift 原生协议的扩展,在原生协议的基础上添加了一些额外的头信息,比如 service name,magic number 等。`2.3.0` 以上版本支持。
 
-
-
-当前 dubbo 支持的 thrift 协议是对 thrift 原生协议 [^1] 的扩展,在原生协议的基础上添加了一些额外的头信息,比如 service name,magic number 等。
-
-{{% alert title="提示" color="primary" %}}
-`2.3.0` 以上版本支持
-{{% /alert %}}
+[Thrift](http://thrift.apache.org) 是 Facebook 捐给 Apache 的一个 RPC 框架。
 
 使用 dubbo thrift 协议同样需要使用 thrift 的 idl compiler 编译生成相应的 java 代码,后续版本中会在这方面做一些增强。
 
-## 依赖
+## 使用场景
+## 使用方式
 
+#### 依赖
 ```xml
 <dependency>
     <groupId>org.apache.thrift</groupId>
@@ -25,21 +23,14 @@ weight: 2
 </dependency>
 ```
 
-## 配置
-
-所有服务共用一个端口 [^2]:
+所有服务共用一个端口:
 
+与原生Thrift不兼容
 ```xml
 <dubbo:protocol name="thrift" port="3030" />
 ```
 
-## 使用
-
-可以参考 [dubbo 项目中的示例代码](https://github.com/apache/dubbo/tree/master/dubbo-rpc/dubbo-rpc-thrift/src/test/java/org/apache/dubbo/rpc/protocol/thrift)
-
-## 常见问题
+ [dubbo 项目中的示例代码](https://github.com/apache/dubbo/tree/master/dubbo-rpc/dubbo-rpc-thrift/src/test/java/org/apache/dubbo/rpc/protocol/thrift)
 
+#### 提示:
 * Thrift 不支持 null 值,即:不能在协议中传递 null 值
-
-[^1]: [Thrift](http://thrift.apache.org) 是 Facebook 捐给 Apache 的一个 RPC 框架
-[^2]: 与原生Thrift不兼容