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 2021/07/23 03:00:59 UTC

[dubbo-website] branch master updated: opt translation (#874)

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 8687073  opt translation (#874)
8687073 is described below

commit 86870739ec51477e19c82ec7da9e7fcda55d8026
Author: 刁兄 <62...@qq.com>
AuthorDate: Fri Jul 23 11:00:52 2021 +0800

    opt translation (#874)
    
    Co-authored-by: jimmy.li <ji...@huolala.cn>
---
 content/zh/docs/v2.7/dev/SPI.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/content/zh/docs/v2.7/dev/SPI.md b/content/zh/docs/v2.7/dev/SPI.md
index 9051f00..bed2491 100644
--- a/content/zh/docs/v2.7/dev/SPI.md
+++ b/content/zh/docs/v2.7/dev/SPI.md
@@ -179,9 +179,9 @@ Wheel wheel = wheelMaker.makeWheel(url);
 // ...
 ```
 
-时,注入的 `Adaptive` 实例可以提取约定 Key 来决定使用哪个 `WheelMaker` 实现来调用对应实现的真正的 `makeWheel` 方法。如提取 `wheel.type`, key 即 `url.get("wheel.type")` 来决定 `WheelMake` 实现。`Adaptive` 实例的逻辑是固定,指定提取的 URL 的 Key,即可以代理真正的实现类上,可以动态生成。
+时,注入的 `Adaptive` 实例可以提取事先定义好的 Key 来决定使用哪个 `WheelMaker` 实现来调用对应实现的真正的 `makeWheel` 方法。如提取 `wheel.type` Key,即 `url.get("wheel.type")` 来决定 `WheelMaker` 实现。`Adaptive` 实例的逻辑是固定,从 URL 中提取事先定义好的 Key,动态生成真正的实现并执行它。
 
-在 Dubbo 的 `ExtensionLoader` 的扩展点类对应的 `Adaptive` 实现是在加载扩展点里动态生成。指定提取的 URL 的 Key 通过 `@Adaptive` 注解在接口方法上提供。
+`ExtensionLoader` 里面的扩展点注入的 `Adaptive` 实现是在dubbo加载扩展点时动态生成的。Key是从URL中获取的,而URL中Key的值是在扩展点接口的方法定义上通过@Adaptive注解提供的。
 
 下面是 Dubbo 的 Transporter 扩展点的代码: