[dubbo-go-hessian2] branch master updated (335b8c6 -> e3dd5d1)

2019-09-22 Thread alexstocks
This is an automated email from the ASF dual-hosted git repository.

alexstocks pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-go-hessian2.git.


from 335b8c6  Merge pull request #132 from wongoo/add_readme
 new f1d4eec  fix chunk string error
 new 7a35c63  change fmt.Printf to t.Logf
 new e3dd5d1  Merge pull request #133 from wongoo/fix-string-chunk

The 416 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 encode_test.go |  9 +
 string.go  | 12 ++--
 string_test.go | 10 +++---
 3 files changed, 18 insertions(+), 13 deletions(-)



[dubbo-website] branch master updated: fix typo. Fixes https://github.com/apache/dubbo/issues/5096 (#476)

2019-09-22 Thread wangxin
This is an automated email from the ASF dual-hosted git repository.

wangxin 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 a2a572a  fix typo. Fixes https://github.com/apache/dubbo/issues/5096 
(#476)
a2a572a is described below

commit a2a572a833e2f1ea6818b7dec1bac248b3be5f6e
Author: bailei 
AuthorDate: Mon Sep 23 10:56:06 2019 +0800

fix typo. Fixes https://github.com/apache/dubbo/issues/5096 (#476)
---
 docs/en-us/dev/impls/router.md | 2 +-
 docs/zh-cn/dev/impls/router.md | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/en-us/dev/impls/router.md b/docs/en-us/dev/impls/router.md
index 49502f3..94c8708 100644
--- a/docs/en-us/dev/impls/router.md
+++ b/docs/en-us/dev/impls/router.md
@@ -24,7 +24,7 @@ src
 |-java
 |-com
 |-xxx
-|-XxxRouterFactory.java (LoadBalance implementation)
+|-XxxRouterFactory.java (RouterFactory implementation)
 |-resources
 |-META-INF
 |-dubbo
diff --git a/docs/zh-cn/dev/impls/router.md b/docs/zh-cn/dev/impls/router.md
index ad7f549..db5a865 100644
--- a/docs/zh-cn/dev/impls/router.md
+++ b/docs/zh-cn/dev/impls/router.md
@@ -24,7 +24,7 @@ src
 |-java
 |-com
 |-xxx
-|-XxxRouterFactory.java (实现LoadBalance接口)
+|-XxxRouterFactory.java (实现RouterFactory接口)
 |-resources
 |-META-INF
 |-dubbo



[dubbo-website] branch master updated: Delete a repeat program statement. (#473)

2019-09-22 Thread wangxin
This is an automated email from the ASF dual-hosted git repository.

wangxin 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 76ce22e  Delete a repeat program statement. (#473)
76ce22e is described below

commit 76ce22e73df6d150338a097c9075c74c4046bf86
Author: zimingsir <42287049+ouyangnen...@users.noreply.github.com>
AuthorDate: Mon Sep 23 10:37:37 2019 +0800

Delete a repeat program statement. (#473)
---
 blog/zh-cn/dubbo-generic-invoke.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blog/zh-cn/dubbo-generic-invoke.md 
b/blog/zh-cn/dubbo-generic-invoke.md
index 508c8d4..d70072a 100644
--- a/blog/zh-cn/dubbo-generic-invoke.md
+++ b/blog/zh-cn/dubbo-generic-invoke.md
@@ -43,7 +43,7 @@ System.out.println(name);
 ## 通过 API 编程进行泛化调用
 
 ```
-ApplicationConfig application = new ApplicationConfig()ApplicationConfig 
application = new ApplicationConfig();
+ApplicationConfig application = new ApplicationConfig();
 application.setName("api-generic-consumer");
 
 RegistryConfig registry = new RegistryConfig();



[dubbo-website] branch master updated: 修正一些文档中的错误 (#475)

2019-09-22 Thread wangxin
This is an automated email from the ASF dual-hosted git repository.

wangxin 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 2db949f  修正一些文档中的错误 (#475)
2db949f is described below

commit 2db949facde1bb4bd4b9d48fb67aad8f751d4f24
Author: maslke 
AuthorDate: Mon Sep 23 10:36:42 2019 +0800

修正一些文档中的错误 (#475)

1. version-28.md 中对 ConsumerConfig 和 ProviderConfig 翻译错误的问题。
2. dubbo-service.md 中 文字拼写 “缺省” 漏掉“省”的问题。
3. recommend.md 中 dubbo:service 配置retries 写成 retry 的问题。
---
 docs/zh-cn/user/recommend.md| 6 +++---
 docs/zh-cn/user/references/xml/dubbo-service.md | 2 +-
 docs/zh-cn/user/versions/version-270.md | 6 ++
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/docs/zh-cn/user/recommend.md b/docs/zh-cn/user/recommend.md
index a27c93b..017a2c5 100644
--- a/docs/zh-cn/user/recommend.md
+++ b/docs/zh-cn/user/recommend.md
@@ -19,10 +19,10 @@ Provider 端尽量多配置 Consumer 端的属性,让 Provider 的实现者一
 
 ```xml
 
+timeout="300" retries="2" loadbalance="random" actives="0" />
  
 
+timeout="300" retries="2" loadbalance="random" actives="0" >
 
 
 ```
@@ -123,7 +123,7 @@ Dubbo 中所有的配置项都可以配置在 Spring 配置文件中,并且可
 ```
 
 2. 注册中心地址 `dubbo.registry.address`
-
+   
 ```xml
 
 ```
diff --git a/docs/zh-cn/user/references/xml/dubbo-service.md 
b/docs/zh-cn/user/references/xml/dubbo-service.md
index 38222bd..adbf0b4 100644
--- a/docs/zh-cn/user/references/xml/dubbo-service.md
+++ b/docs/zh-cn/user/references/xml/dubbo-service.md
@@ -20,7 +20,7 @@
 | mock | mock | class/boolean | 可选 | false | 服务治理 | 设为true,表示使用缺省Mock类名,即:接口名 
+ 
Mock后缀,服务接口调用失败Mock实现类,该Mock类必须有一个无参构造函数,与Local的区别在于,Local总是被执行,而Mock只在出现非业务异常(比如超时,网络异常等)时执行,Local在远程调用之前执行,Mock在远程调用后执行。
 | 2.0.0以上版本 |
 | token | token | string/boolean | 可选 | false | 服务治理 | 
令牌验证,为空表示不开启,如果为true,表示随机生成动态令牌,否则使用静态令牌,令牌的作用是防止消费者绕过注册中心直接访问,保证注册中心的授权功能有效,如果使用点对点调用,需关闭令牌功能
 | 2.0.0以上版本 |
 | registry | | string | 可选 | 缺省向所有registry注册 | 配置关联 | 
向指定注册中心注册,在多个注册中心时使用,值为dubbo:registry的id属性,多个注册中心ID用逗号分隔,如果不想将该服务注册到任何registry,可将值设为N/A
 | 2.0.0以上版本 |
-| provider | | string | 可选 | 缺使用第一个provider配置 | 配置关联 | 
指定provider,值为dubbo:provider的id属性 | 2.0.0以上版本 |
+| provider | | string | 可选 | 缺省使用第一个provider配置 | 配置关联 | 
指定provider,值为dubbo:provider的id属性 | 2.0.0以上版本 |
 | deprecated | deprecated | boolean | 可选 | false | 服务治理 | 
服务是否过时,如果设为true,消费方引用时将打印服务过时警告error日志 | 2.0.5以上版本 |
 | dynamic | dynamic | boolean | 可选 | true | 服务治理 | 
服务是否动态注册,如果设为false,注册后将显示后disable状态,需人工启用,并且服务提供者停止时,也不会自动取消册,需人工禁用。 | 
2.0.5以上版本 |
 | accesslog | accesslog | string/boolean | 可选 | false | 服务治理 | 
设为true,将向logger中输出访问日志,也可填写访问日志文件路径,直接把访问日志输出到指定文件 | 2.0.5以上版本 |
diff --git a/docs/zh-cn/user/versions/version-270.md 
b/docs/zh-cn/user/versions/version-270.md
index bba14c6..7daa938 100644
--- a/docs/zh-cn/user/versions/version-270.md
+++ b/docs/zh-cn/user/versions/version-270.md
@@ -92,7 +92,6 @@ dubbo.metadataReport.address=redis://127.0.0.1:6379
 
 
 使用外部化配置
-
 
需要在项目启动前,使用[最新版本Dubbo-OPS](https://github.com/apache/dubbo-ops)完成外部化配置迁移,理论上配置中心支持所有本地dubbo.properties所支持的配置项。
 
 以XML开发形式为例,假设我们本地有如下配置:
@@ -217,7 +216,6 @@ dubbo.protocol.port=20880
 
 
 包名改造
-
 1. Maven坐标
 
 **groupId 由 `com.alibaba` 改为 `org.apache.dubbo`**
@@ -251,8 +249,8 @@ Maven坐标升级比较直观,只需要修改相应的pom文件就可以了;
 | ServiceConfig | Service配置采集和暴露编程接口 |
 | ApplicationConfig | Application配置采集API|
 | RegistryConfig| 注册中心配置采集API   |
-| ConsumerConfig| 提供端默认配置采集API |
-| ProviderConfig| 消费端默认配置采集API |
+| ConsumerConfig| 消费端默认配置采集API |
+| ProviderConfig| 提供端默认配置采集API |
 | ProtocolConfig| RPC协议配置采集API|
 | ArcumentConfig| 服务参数级配置采集API |
 | MethodConfig  | 服务方法级配置采集API |



[dubbo] branch 2.7.4-release updated: [Feature] Using the ID of Dubbo Config as the alias of Bean (#5094)

2019-09-22 Thread mercyblitz
This is an automated email from the ASF dual-hosted git repository.

mercyblitz pushed a commit to branch 2.7.4-release
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/2.7.4-release by this push:
 new 7f5e9df  [Feature] Using the ID of Dubbo Config as the alias of Bean  
(#5094)
7f5e9df is described below

commit 7f5e9df73a5b13f943b900f39e8e95d8b5c44a64
Author: Mercy Ma 
AuthorDate: Mon Sep 23 10:17:23 2019 +0800

[Feature] Using the ID of Dubbo Config as the alias of Bean  (#5094)

* Polish /apache/dubbo#4687 : Remove the duplicated test code in 
dubbo-config-spring

* Polish /apache/dubbo#4674 & /apache/dubbo#4470

* Polish /apache/dubbo#5093 : Revert the previous commit

* Polish apache/dubbo#5093 : [Feature] Dubbo Services generate the metadata 
of REST services
---
 .../annotation/DubboConfigAliasPostProcessor.java  | 74 ++
 .../DubboConfigBindingBeanPostProcessor.java   | 30 +
 .../DubboConfigConfigurationRegistrar.java | 15 +
 .../spring/schema/DubboBeanDefinitionParser.java   | 17 -
 .../dubbo/config/spring/util/BeanRegistrar.java| 15 +
 .../DubboConfigBindingBeanPostProcessorTest.java   | 16 -
 .../context/annotation/EnableDubboConfigTest.java  | 12 
 7 files changed, 133 insertions(+), 46 deletions(-)

diff --git 
a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/DubboConfigAliasPostProcessor.java
 
b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/DubboConfigAliasPostProcessor.java
new file mode 100644
index 000..ddbcbf0
--- /dev/null
+++ 
b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/DubboConfigAliasPostProcessor.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.config.spring.beans.factory.annotation;
+
+import org.apache.dubbo.config.AbstractConfig;
+import 
org.apache.dubbo.config.spring.context.annotation.DubboConfigConfigurationRegistrar;
+
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.config.BeanPostProcessor;
+import 
org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
+import org.springframework.beans.factory.support.BeanDefinitionRegistry;
+import 
org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;
+
+import static org.apache.dubbo.config.spring.util.BeanRegistrar.hasAlias;
+import static org.springframework.util.ObjectUtils.nullSafeEquals;
+import static org.springframework.util.StringUtils.hasText;
+
+/**
+ * A Post-Processor class to set the alias of Dubbo Config bean using its 
{@link AbstractConfig#getId()}
+ *
+ * @since 2.7.4
+ */
+public class DubboConfigAliasPostProcessor implements 
BeanDefinitionRegistryPostProcessor, BeanPostProcessor {
+
+/**
+ * The bean name of {@link DubboConfigConfigurationRegistrar}
+ */
+public final static String BEAN_NAME = "dubboConfigAliasPostProcessor";
+
+private BeanDefinitionRegistry registry;
+
+@Override
+public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry 
registry) throws BeansException {
+this.registry = registry;
+}
+
+@Override
+public void postProcessBeanFactory(ConfigurableListableBeanFactory 
beanFactory) throws BeansException {
+// DO NOTHING
+}
+
+@Override
+public Object postProcessBeforeInitialization(Object bean, String 
beanName) throws BeansException {
+// DO NOTHING
+return bean;
+}
+
+@Override
+public Object postProcessAfterInitialization(Object bean, String beanName) 
throws BeansException {
+if (bean instanceof AbstractConfig) {
+String id = ((AbstractConfig) bean).getId();
+if (hasText(id) // id MUST be 
present in AbstractConfig
+&& !nullSafeEquals(id, beanName)// id MUST NOT 
be equal to bean name
+&& !hasAlias(registry, beanName, id)) { // id MUST NOT 
be 

[dubbo] branch master updated: 修复 CollectionUtils类toStringMap方法没有检查 pairs 参数是否为空. (#5102)

2019-09-22 Thread crazyhzm
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 0d09ef9  修复 CollectionUtils类toStringMap方法没有检查 pairs 参数是否为空. (#5102)
0d09ef9 is described below

commit 0d09ef9b5641c7f150e6c0f3471231db4a879bfd
Author: xiaoheng1 <2018154...@qq.com>
AuthorDate: Sun Sep 22 23:27:58 2019 +0800

修复 CollectionUtils类toStringMap方法没有检查 pairs 参数是否为空. (#5102)

* 修复 CollectionUtils类toStringMap方法没有检查 pairs 参数是否为空.
Fixed #5100

* 使用 ArrayUtils#isEmpty 方法检查 pairs 参数是否为空.
Fixed #5100
---
 .../src/main/java/org/apache/dubbo/common/utils/CollectionUtils.java  | 4 
 1 file changed, 4 insertions(+)

diff --git 
a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/CollectionUtils.java 
b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/CollectionUtils.java
index 40baecd..4e924b3 100644
--- 
a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/CollectionUtils.java
+++ 
b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/CollectionUtils.java
@@ -173,6 +173,10 @@ public class CollectionUtils {
 
 public static Map toStringMap(String... pairs) {
 Map parameters = new HashMap<>();
+if(ArrayUtils.isEmpty(pairs)){
+return parameters;
+}
+
 if (pairs.length > 0) {
 if (pairs.length % 2 != 0) {
 throw new IllegalArgumentException("pairs must be even.");



[dubbo-go] branch master updated: Fix: registryProtocol.Export

2019-09-22 Thread alexstocks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 05d6b72  Fix: registryProtocol.Export
 new 8a41f12  Merge pull request #213 from fangyincheng/fixbug
05d6b72 is described below

commit 05d6b7249ebd7eda26f092c05489439e1b4039db
Author: fangyincheng 
AuthorDate: Sun Sep 22 13:17:51 2019 +0800

Fix: registryProtocol.Export
---
 registry/protocol/protocol.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/registry/protocol/protocol.go b/registry/protocol/protocol.go
index d1e02b1..c746cf8 100644
--- a/registry/protocol/protocol.go
+++ b/registry/protocol/protocol.go
@@ -174,7 +174,7 @@ func (proto *registryProtocol) Export(invoker 
protocol.Invoker) protocol.Exporte
logger.Infof("The exporter has not been cached, and will return 
a new  exporter!")
}
 
-   reg.Subscribe(overriderUrl, overrideSubscribeListener)
+   go reg.Subscribe(overriderUrl, overrideSubscribeListener)
return cachedExporter.(protocol.Exporter)
 
 }