[dubbo] branch master updated: [dubbo-4712] add Thread ContextClassLoader (#4767)
This is an automated email from the ASF dual-hosted git repository. kexianjun 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 165d975 [dubbo-4712] add Thread ContextClassLoader (#4767) 165d975 is described below commit 165d975dec620516768832e883b99bd3ce87d17a Author: windWheel <1817802...@qq.com> AuthorDate: Sat Aug 10 13:19:11 2019 +0800 [dubbo-4712] add Thread ContextClassLoader (#4767) fix #4712 --- .../org/apache/dubbo/metadata/integration/MetadataReportService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dubbo-metadata-report/dubbo-metadata-report-api/src/main/java/org/apache/dubbo/metadata/integration/MetadataReportService.java b/dubbo-metadata-report/dubbo-metadata-report-api/src/main/java/org/apache/dubbo/metadata/integration/MetadataReportService.java index 06d39b6..5ceb5c5 100644 --- a/dubbo-metadata-report/dubbo-metadata-report-api/src/main/java/org/apache/dubbo/metadata/integration/MetadataReportService.java +++ b/dubbo-metadata-report/dubbo-metadata-report-api/src/main/java/org/apache/dubbo/metadata/integration/MetadataReportService.java @@ -94,7 +94,8 @@ public class MetadataReportService { try { String interfaceName = providerUrl.getParameter(INTERFACE_KEY); if (StringUtils.isNotEmpty(interfaceName)) { -Class interfaceClass = Class.forName(interfaceName); +ClassLoader classLoader = null == Thread.currentThread().getContextClassLoader() ? this.getClass().getClassLoader() : Thread.currentThread().getContextClassLoader(); +Class interfaceClass = Class.forName(interfaceName, true, classLoader); FullServiceDefinition fullServiceDefinition = ServiceDefinitionBuilder.buildFullDefinition(interfaceClass, providerUrl.getParameters()); metadataReport.storeProviderMetadata(new MetadataIdentifier(providerUrl.getServiceInterface(), providerUrl.getParameter(VERSION_KEY), providerUrl.getParameter(GROUP_KEY),
[dubbo-spring-boot-project] branch master updated: Update README.md
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-spring-boot-project.git The following commit(s) were added to refs/heads/master by this push: new 28e73a8 Update README.md 28e73a8 is described below commit 28e73a892dd15dbbab12645cd33ae292233f0bd5 Author: Xin Wang AuthorDate: Sat Aug 10 09:41:40 2019 +0800 Update README.md --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 7930db2..6796a55 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,6 @@ ![license](https://img.shields.io/github/license/apache/dubbo-spring-boot-project.svg) [Apache Dubbo](https://github.com/apache/dubbo) Spring Boot Project makes it easy to create [Spring Boot](https://github.com/spring-projects/spring-boot/) application using Dubbo as RPC Framework. What's more, it also provides -[![codecov](https://codecov.io/gh/apache/dubbo-spring-boot-project/branch/master/graph/badge.svg)](https://codecov.io/gh/apache/ubbo-spring-boot-project) -![license](https://img.shields.io/github/license/apache/dubbo-spring-boot-project.svg) - * [auto-configure features](dubbo-spring-boot-autoconfigure) (e.g., annotation-driven, auto configuration, externalized configuration). * [production-ready features](dubbo-spring-boot-actuator) (e.g., security, health checks, externalized configuration).
[dubbo-go.wiki] branch master updated: Updated Home (markdown)
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.wiki.git The following commit(s) were added to refs/heads/master by this push: new 4487ce0 Updated Home (markdown) 4487ce0 is described below commit 4487ce08579e3e7ecd1b81930dba5962bb23ea91 Author: Xin.Zh AuthorDate: Fri Aug 9 21:26:25 2019 +0800 Updated Home (markdown) --- Home.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Home.md b/Home.md index 337533e..d1f24e3 100644 --- a/Home.md +++ b/Home.md @@ -1,4 +1,4 @@ -# Go for Apache Dubbo [中文](./README_CN.md) # +# Apache Dubbo-Go [中文](./README_CN.md) # [![Build Status](https://travis-ci.com/dubbo/go-for-apache-dubbo.svg?branch=master)](https://travis-ci.com/dubbo/go-for-apache-dubbo) [![codecov](https://codecov.io/gh/dubbo/go-for-apache-dubbo/branch/master/graph/badge.svg)](https://codecov.io/gh/dubbo/go-for-apache-dubbo)
[dubbo-go] branch develop updated (2bfc6a9 -> 046699a)
This is an automated email from the ASF dual-hosted git repository. xinminghe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/dubbo-go.git. from 2bfc6a9 Merge pull request #158 from xujianhai666/feat-broadcast add ea373a7 Update README.md add ff8c560 Update README.md add 739c744 Update README_CN.md add 86687a1 Update README.md add 6bdab5d Update README_CN.md add 046699a Fix:bug in failbackClusterInvoker No new revisions were added by this update. Summary of changes: README.md| 4 ++-- README_CN.md | 4 ++-- cluster/cluster_impl/failback_cluster_invoker.go | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-)
[dubbo-go] branch master updated: Fix:bug in failbackClusterInvoker
This is an automated email from the ASF dual-hosted git repository. xinminghe 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 046699a Fix:bug in failbackClusterInvoker 046699a is described below commit 046699a1a90abfeb2a07dc4f9c391d60953c4f2a Author: vito.he AuthorDate: Fri Aug 9 19:53:34 2019 +0800 Fix:bug in failbackClusterInvoker --- cluster/cluster_impl/failback_cluster_invoker.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cluster/cluster_impl/failback_cluster_invoker.go b/cluster/cluster_impl/failback_cluster_invoker.go index 08b1577..027461c 100644 --- a/cluster/cluster_impl/failback_cluster_invoker.go +++ b/cluster/cluster_impl/failback_cluster_invoker.go @@ -175,7 +175,9 @@ func (invoker *failbackClusterInvoker) Destroy() { invoker.baseClusterInvoker.Destroy() // stop ticker - invoker.ticker.Stop() + if invoker.ticker != nil { + invoker.ticker.Stop() + } _ = invoker.taskList.Dispose() }
[dubbo-go] branch master updated: Update README_CN.md
This is an automated email from the ASF dual-hosted git repository. xinminghe 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 6bdab5d Update README_CN.md 6bdab5d is described below commit 6bdab5d69620ba7b1ff9666c541f073f396cbb11 Author: vito.he AuthorDate: Fri Aug 9 19:28:04 2019 +0800 Update README_CN.md --- README_CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_CN.md b/README_CN.md index 489f9de..7732a65 100644 --- a/README_CN.md +++ b/README_CN.md @@ -56,7 +56,7 @@ Apache License, Version 2.0 ## 文档 -移步[这里](https://dubbogo.github.io/dubbo-go-website/) +TODO ## 快速开始 ##
[dubbo-go] branch master updated: Update README.md
This is an automated email from the ASF dual-hosted git repository. xinminghe 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 86687a1 Update README.md 86687a1 is described below commit 86687a1584f3c4f2960df33c358693442d739276 Author: vito.he AuthorDate: Fri Aug 9 19:27:22 2019 +0800 Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5f00570..593be70 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ You can know more about dubbo-go by its [roadmap](https://github.com/apache/dubb ## Document -Move [here](https://dubbogo.github.io/dubbo-go-website/) +TODO ## Quick Start
[dubbo-go] branch master updated: Update README.md
This is an automated email from the ASF dual-hosted git repository. xinminghe 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 ff8c560 Update README.md ff8c560 is described below commit ff8c5606068681e738638fb0ad20528985870f04 Author: vito.he AuthorDate: Fri Aug 9 19:24:59 2019 +0800 Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4e6b5fe..5f00570 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Finished List: - Codec: JsonRPC v2, Hessian v2 - Registry: ZooKeeper - Configure Center: Zookeeper -- Cluster Strategy: Failover/[Failfast](https://github.com/apache/dubbo-go/pull/140)/[Failsafe/Failback](https://github.com/apache/dubbo-go/pull/136)/available/broadcast +- Cluster Strategy: Failover/[Failfast](https://github.com/apache/dubbo-go/pull/140)/[Failsafe/Failback](https://github.com/apache/dubbo-go/pull/136)/Available/Broadcast - Load Balance: Random/[RoundRobin](https://github.com/apache/dubbo-go/pull/66)/[LeastActive](https://github.com/apache/dubbo-go/pull/65) - Filter: Echo Health Check - Other feature: [generic invoke](https://github.com/apache/dubbo-go/pull/122)/start check/connecting certain provider/multi-protocols/multi-registries/multi-versions/service group
[dubbo-go] branch master updated: Update README_CN.md
This is an automated email from the ASF dual-hosted git repository. xinminghe 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 739c744 Update README_CN.md 739c744 is described below commit 739c744a3da479066614c20b92652e77a897a73a Author: vito.he AuthorDate: Fri Aug 9 19:25:36 2019 +0800 Update README_CN.md --- README_CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_CN.md b/README_CN.md index f6f873b..489f9de 100644 --- a/README_CN.md +++ b/README_CN.md @@ -31,7 +31,7 @@ Apache License, Version 2.0 - 序列化协议: JsonRPC v2, Hessian v2 - 注册中心: ZooKeeper - 配置中心: Zookeeper -- 集群策略: Failover/[Failfast](https://github.com/apache/dubbo-go/pull/140)/[Failsafe/Failback](https://github.com/apache/dubbo-go/pull/136) +- 集群策略: Failover/[Failfast](https://github.com/apache/dubbo-go/pull/140)/[Failsafe/Failback](https://github.com/apache/dubbo-go/pull/136)/Available/Broadcast - 负载均衡策略: Random/[RoundRobin](https://github.com/apache/dubbo-go/pull/66)/[LeastActive](https://github.com/apache/dubbo-go/pull/65) - 过滤器: Echo Health Check - 其他功能支持: [泛化调用](https://github.com/apache/dubbo-go/pull/122)/启动时检查/服务直连/多服务协议/多注册中心/多服务版本/服务分组
[dubbo-go] branch master updated: Update README.md
This is an automated email from the ASF dual-hosted git repository. xinminghe 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 ea373a7 Update README.md ea373a7 is described below commit ea373a78833ca703fc20abdde772cbb9e06b64fe Author: vito.he AuthorDate: Fri Aug 9 19:24:33 2019 +0800 Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a09dfb9..4e6b5fe 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Finished List: - Codec: JsonRPC v2, Hessian v2 - Registry: ZooKeeper - Configure Center: Zookeeper -- Cluster Strategy: Failover/[Failfast](https://github.com/apache/dubbo-go/pull/140)/[Failsafe/Failback](https://github.com/apache/dubbo-go/pull/136) +- Cluster Strategy: Failover/[Failfast](https://github.com/apache/dubbo-go/pull/140)/[Failsafe/Failback](https://github.com/apache/dubbo-go/pull/136)/available/broadcast - Load Balance: Random/[RoundRobin](https://github.com/apache/dubbo-go/pull/66)/[LeastActive](https://github.com/apache/dubbo-go/pull/65) - Filter: Echo Health Check - Other feature: [generic invoke](https://github.com/apache/dubbo-go/pull/122)/start check/connecting certain provider/multi-protocols/multi-registries/multi-versions/service group
[dubbo-go] branch develop updated (bac7c65 -> 2bfc6a9)
This is an automated email from the ASF dual-hosted git repository. xinminghe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/dubbo-go.git. from bac7c65 Mod:merge from develop add 39733d1 add available cluster support add 8194fe8 Merge pull request #155 from xujianhai666/feat-avail add a6d900f add broadcast cluster add 2bfc6a9 Merge pull request #158 from xujianhai666/feat-broadcast No new revisions were added by this update. Summary of changes: .../{failfast_cluster.go => available_cluster.go} | 14 ++-- ...ter_invoker.go => available_cluster_invoker.go} | 26 +--- ...r_test.go => available_cluster_invoker_test.go} | 39 +--- .../{failfast_cluster.go => broadcast_cluster.go} | 14 ++-- ...ter_invoker.go => broadcast_cluster_invoker.go} | 26 +--- ...r_test.go => broadcast_cluster_invoker_test.go} | 74 +- 6 files changed, 109 insertions(+), 84 deletions(-) copy cluster/cluster_impl/{failfast_cluster.go => available_cluster.go} (76%) copy cluster/cluster_impl/{failfast_cluster_invoker.go => available_cluster_invoker.go} (70%) copy cluster/cluster_impl/{failsafe_cluster_test.go => available_cluster_invoker_test.go} (67%) copy cluster/cluster_impl/{failfast_cluster.go => broadcast_cluster.go} (74%) copy cluster/cluster_impl/{failfast_cluster_invoker.go => broadcast_cluster_invoker.go} (66%) copy cluster/cluster_impl/{failsafe_cluster_test.go => broadcast_cluster_invoker_test.go} (51%)
[dubbo-go] branch master updated: add broadcast cluster
This is an automated email from the ASF dual-hosted git repository. xinminghe 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 a6d900f add broadcast cluster new 2bfc6a9 Merge pull request #158 from xujianhai666/feat-broadcast a6d900f is described below commit a6d900f63a0ea05e37315c200e858570f0a1ebfd Author: xujianhai666 AuthorDate: Tue Aug 6 23:06:42 2019 +0800 add broadcast cluster --- cluster/cluster_impl/broadcast_cluster.go | 40 cluster/cluster_impl/broadcast_cluster_invoker.go | 59 +++ .../cluster_impl/broadcast_cluster_invoker_test.go | 109 + 3 files changed, 208 insertions(+) diff --git a/cluster/cluster_impl/broadcast_cluster.go b/cluster/cluster_impl/broadcast_cluster.go new file mode 100644 index 000..50aae3c --- /dev/null +++ b/cluster/cluster_impl/broadcast_cluster.go @@ -0,0 +1,40 @@ +/* +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 cluster_impl + +import ( + "github.com/apache/dubbo-go/cluster" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/protocol" +) + +type broadcastCluster struct{} + +const broadcast = "broadcast" + +func init() { + extension.SetCluster(broadcast, NewBroadcastCluster) +} + +func NewBroadcastCluster() cluster.Cluster { + return {} +} + +func (cluster *broadcastCluster) Join(directory cluster.Directory) protocol.Invoker { + return newBroadcastClusterInvoker(directory) +} diff --git a/cluster/cluster_impl/broadcast_cluster_invoker.go b/cluster/cluster_impl/broadcast_cluster_invoker.go new file mode 100644 index 000..238df0a --- /dev/null +++ b/cluster/cluster_impl/broadcast_cluster_invoker.go @@ -0,0 +1,59 @@ +/* +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 cluster_impl + +import ( + "github.com/apache/dubbo-go/cluster" + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/protocol" +) + +type broadcastClusterInvoker struct { + baseClusterInvoker +} + +func newBroadcastClusterInvoker(directory cluster.Directory) protocol.Invoker { + return { + baseClusterInvoker: newBaseClusterInvoker(directory), + } +} + +func (invoker *broadcastClusterInvoker) Invoke(invocation protocol.Invocation) protocol.Result { + invokers := invoker.directory.List(invocation) + err := invoker.checkInvokers(invokers, invocation) + if err != nil { + return {Err: err} + } + err = invoker.checkWhetherDestroyed() + if err != nil { + return {Err: err} + } + + var result protocol.Result + for _, ivk := range invokers { + result = ivk.Invoke(invocation) + if result.Error() != nil { + logger.Warnf("broadcast invoker invoke err: %v when use invoker: %v\n", result.Error(), ivk) + err = result.Error() + } + } + if err != nil { + return {Err: err} + } + return result +} diff --git a/cluster/cluster_impl/broadcast_cluster_invoker_test.go b/cluster/cluster_impl/broadcast_cluster_invoker_test.go new file mode 100644 index 000..565684a --- /dev/null +++ b/cluster/cluster_impl/broadcast_cluster_invoker_test.go @@ -0,0 +1,109 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license
[dubbo-go] branch master updated: add available cluster support
This is an automated email from the ASF dual-hosted git repository. xinminghe 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 39733d1 add available cluster support new 8194fe8 Merge pull request #155 from xujianhai666/feat-avail 39733d1 is described below commit 39733d1f6ad6877075474c187d513ddac5342f70 Author: xujianhai666 AuthorDate: Tue Aug 6 18:29:43 2019 +0800 add available cluster support --- cluster/cluster_impl/available_cluster.go | 40 ++ cluster/cluster_impl/available_cluster_invoker.go | 61 +++ .../cluster_impl/available_cluster_invoker_test.go | 88 ++ 3 files changed, 189 insertions(+) diff --git a/cluster/cluster_impl/available_cluster.go b/cluster/cluster_impl/available_cluster.go new file mode 100644 index 000..7e748cd --- /dev/null +++ b/cluster/cluster_impl/available_cluster.go @@ -0,0 +1,40 @@ +/* +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 cluster_impl + +import ( + "github.com/apache/dubbo-go/cluster" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/protocol" +) + +type availableCluster struct{} + +const available = "available" + +func init() { + extension.SetCluster(available, NewAvailableCluster) +} + +func NewAvailableCluster() cluster.Cluster { + return {} +} + +func (cluser *availableCluster) Join(directory cluster.Directory) protocol.Invoker { + return NewAvailableClusterInvoker(directory) +} diff --git a/cluster/cluster_impl/available_cluster_invoker.go b/cluster/cluster_impl/available_cluster_invoker.go new file mode 100644 index 000..c59c070 --- /dev/null +++ b/cluster/cluster_impl/available_cluster_invoker.go @@ -0,0 +1,61 @@ +/* +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 cluster_impl + +import ( + "fmt" +) + +import ( + "github.com/pkg/errors" +) + +import ( + "github.com/apache/dubbo-go/cluster" + "github.com/apache/dubbo-go/protocol" +) + +type availableClusterInvoker struct { + baseClusterInvoker +} + +func NewAvailableClusterInvoker(directory cluster.Directory) protocol.Invoker { + return { + baseClusterInvoker: newBaseClusterInvoker(directory), + } +} + +func (invoker *availableClusterInvoker) Invoke(invocation protocol.Invocation) protocol.Result { + invokers := invoker.directory.List(invocation) + err := invoker.checkInvokers(invokers, invocation) + if err != nil { + return {Err: err} + } + + err = invoker.checkWhetherDestroyed() + if err != nil { + return {Err: err} + } + + for _, ivk := range invokers { + if ivk.IsAvailable() { + return ivk.Invoke(invocation) + } + } + return {Err: errors.New(fmt.Sprintf("no provider available in %v", invokers))} +} diff --git a/cluster/cluster_impl/available_cluster_invoker_test.go b/cluster/cluster_impl/available_cluster_invoker_test.go new file mode 100644 index 000..04032a7 --- /dev/null +++ b/cluster/cluster_impl/available_cluster_invoker_test.go @@ -0,0 +1,88 @@ +/* +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
[dubbo-go] branch develop updated (63e0369 -> bac7c65)
This is an automated email from the ASF dual-hosted git repository. xinminghe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/dubbo-go.git. from 63e0369 Merge pull request #157 from hxmhlt/apache_dev add 36474b2 Mod: delete go1.11 in travis config add b95ea52 Fix license head file add 414bb0c Merge pull request #138 from wolfstudy/xiaolong/fix-license-header add e665b55 fix hessian2 package after transfering to apache add 887a3f6 Merge pull request #145 from wongoo/fix-packages add 40fba78 add failfast. resolve #139 add 14e1487 Merge pull request #140 from xujianhai666/feat-failfast add 36836f4 Merge branch 'master' of https://github.com/apache/dubbo-go add a70c3bc Mod: add load balance & cluster strategy ralated pr add deb4edb failback and failsafe develop add af257b8 add failback_cluster_invoker && failsafe_cluster_invoker. resolve #135 add 2ac5472 Merge pull request #136 from xujianhai666/failsafe add 8834150 Merge branch 'master' of https://github.com/apache/dubbo-go add 7c36108 Update README.md add e1d88a4 Update README_CN.md add f903962 Update README.md add 11e43a8 Update README_CN.md add 981e535 Mod: change hessian2 version add 97a7790 Fix: mis spell add fc57bce Fix:go.mod add a14701b Merge pull request #159 from fangyincheng/master add 320c0e1 remove ineffassign add 8017536 remove ineffassign add f169566 Merge pull request #160 from xujianhai666/feat-remove-ineffassign add bac7c65 Mod:merge from develop No new revisions were added by this update. Summary of changes: .gitignore | 1 + README.md | 9 +- README_CN.md | 32 +-- cluster/cluster_impl/base_cluster_invoker.go | 24 +- .../{failover_cluster.go => failback_cluster.go} | 14 +- cluster/cluster_impl/failback_cluster_invoker.go | 201 + cluster/cluster_impl/failback_cluster_test.go | 242 + cluster/cluster_impl/failfast_cluster.go | 40 cluster/cluster_impl/failfast_cluster_invoker.go | 51 + cluster/cluster_impl/failfast_cluster_test.go | 97 + cluster/cluster_impl/failover_cluster_invoker.go | 13 +- .../{failover_cluster.go => failsafe_cluster.go} | 14 +- cluster/cluster_impl/failsafe_cluster_invoker.go | 75 +++ cluster/cluster_impl/failsafe_cluster_test.go | 95 cluster/loadbalance/least_active.go| 27 ++- cluster/loadbalance/round_robin.go | 28 ++- common/constant/default.go | 12 +- common/constant/key.go | 2 + filter/impl/active_filter.go | 27 ++- go.mod | 3 + go.sum | 8 + protocol/RpcStatus.go | 27 ++- protocol/dubbo/readwriter.go | 3 +- protocol/invoker.go| 1 + protocol/mock/mock_invoker.go | 87 25 files changed, 1033 insertions(+), 100 deletions(-) copy cluster/cluster_impl/{failover_cluster.go => failback_cluster.go} (77%) create mode 100644 cluster/cluster_impl/failback_cluster_invoker.go create mode 100644 cluster/cluster_impl/failback_cluster_test.go create mode 100644 cluster/cluster_impl/failfast_cluster.go create mode 100644 cluster/cluster_impl/failfast_cluster_invoker.go create mode 100644 cluster/cluster_impl/failfast_cluster_test.go copy cluster/cluster_impl/{failover_cluster.go => failsafe_cluster.go} (77%) create mode 100644 cluster/cluster_impl/failsafe_cluster_invoker.go create mode 100644 cluster/cluster_impl/failsafe_cluster_test.go create mode 100644 protocol/mock/mock_invoker.go
[dubbo-go] branch master updated (f169566 -> bac7c65)
This is an automated email from the ASF dual-hosted git repository. xinminghe pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/dubbo-go.git. from f169566 Merge pull request #160 from xujianhai666/feat-remove-ineffassign add b1ce26e Add:support multi-implementation of service add 5ba44f9 Mod:modify rpcinvocation.go add e894ce1 Ftr: allow user set custom params to register to registry add e89f362 Fix:base_config.go setFieldValue bug add d7e948e Fix: unit test TestListener in listener_test.go add cc1f089 Fix:can not need children id add d59c087 Merge pull request #117 from hxmhlt/config_params add f3e33d7 Mrg:merge add 4fa45b5 Merge pull request #119 from fangyincheng/develop add 5cd0d98 Mrg:merge master add 00e2933 Imp:improve config & update getty & add connect timeout add dd1c82c Mod:change timer to wheel add dd2c0a9 Merge pull request #123 from fangyincheng/develop add b9a0f74 Add:GetLogger add 8238cab Merge pull request #125 from fangyincheng/develop add 39e0902 Add:for zookeeper registry cluster add 7be1601 Fmt:code formate add 72f Merge pull request #124 from hxmhlt/master add 368d2f3 Add:update readme add 05ea35f Mrg:merge add d0984fe Merge pull request #128 from fangyincheng/develop add a38d1fa merge master add 2d1eead change getty version to 1.2.0 add d233238 Merge pull request #134 from aliiohs/FixUpdateHessianVersion add cda1cf9 Mrg: update getty version add 7a24cc6 Merge remote-tracking branch 'upstream/master' into develop add 6a272cb Mod: adjust the log level add 3ff4931 Merge pull request #132 from fangyincheng/develop add 8a874cf upgrade getty: remove read queue add 8ea2e60 Merge pull request #137 from wongoo/develop add b7f6669 Mod: example modify, Make it easier for beginners to get started add 7aa7732 Mod: example modify, ci failed reslove add 306054c Mod: make simple more easy add 76a21c3 Mod: use task pool of getty add 06eb335 Merge remote-tracking branch 'upstream/develop' into develop add 152921f Mod: modify testdata add 8dd9f77 Mod: grpool config add 688a156 Merge pull request #141 from fangyincheng/develop add 680b584 Merge remote-tracking branch 'apache/develop' into modify_example add 4f20d72 resolve conflict add 3458324 Merge pull request #142 from hxmhlt/modify_example add d76440d fix hessian2 package after transfering to apache add 092399a Merge pull request #144 from wongoo/fix-hessian2-package add 4379d39 Mod: delete go1.11 in travis config add 22498ac Merge pull request #1 from apache/master add 47c4d20 Merge pull request #2 from apache/develop add 9751266 add go to java generic add 6cde06a fix test add 25b1512 update add e216bcb 优化 add 2cf9399 改成和java一样的使用方式 add 4df2f94 fix add e545dd0 add license add 48073dd change file name add 5e0ebf7 fix、and jsonrpc has no genericComsumer add 79775de Merge pull request #3 from apache/develop add 4dbeb2a fix bug with Temporary disposal add 0b111a5 Merge pull request #5 from apache/develop add 7f00a83 Merge branch 'master' of https://github.com/pantianying/dubbo-go add 09b9130 update add 81b8c35 change annotation add 96f5554 add generic filter add e9d7d86 Merge remote-tracking branch 'apache/develop' add 74e16bb add ut add 428fad4 ut be compatible with go 1.11 add 31c898f add Generic tag add d77c8e3 Merge branch 'develop' into master add 6e5df6c fix add a1e9a4d fix fmt add 068983b add generic config.Load support add c3d2c9c fix bug add 754252b add hessain.Object to genericfilter add d7be686 add support add 4271bcc fix add 1faca0c generic filter add slice support add cd1d707 change code style add 57cbc46 fix code add 0c6e36c fix bug add 8d7c1c1 Merge pull request #122 from pantianying/master add 168dbd9 Fix:bug in reference_config add 63e0369 Merge pull request #157 from hxmhlt/apache_dev new bac7c65 Mod:merge from develop The 1 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: .gitignore | 1 + README.md | 11 + README_CN.md | 13 + cluster/cluster_impl/failover_cluster_test.go | 3 +- cluster/loadbalance/least_active_test.go | 3 +- cluster/loadbalance/random_test.go | 6 +- common/constant/default.go | 2 +
[dubbo-go] 01/01: Mod:merge from develop
This is an automated email from the ASF dual-hosted git repository. xinminghe pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo-go.git commit bac7c65d468a05954386919743d87a87f0409194 Merge: f169566 63e0369 Author: vito.he AuthorDate: Fri Aug 9 19:08:26 2019 +0800 Mod:merge from develop .gitignore | 1 + README.md | 11 + README_CN.md | 13 + cluster/cluster_impl/failover_cluster_test.go | 3 +- cluster/loadbalance/least_active_test.go | 3 +- cluster/loadbalance/random_test.go | 6 +- common/constant/default.go | 2 + common/constant/key.go | 2 + common/logger/logger.go| 9 +- common/proxy/proxy.go | 4 +- common/proxy/proxy_test.go | 10 +- common/rpc_service.go | 15 +- common/rpc_service_test.go | 17 +- common/url.go | 5 + config/base_config.go | 40 +-- config/base_config_test.go | 23 +- config/config_loader.go| 36 ++- config/config_loader_test.go | 19 +- config/consumer_config.go | 3 +- .../app/version.go => config/generic_service.go| 16 +- config/mock_rpcservice.go | 6 +- config/provider_config.go | 2 +- config/reference_config.go | 58 ++-- config/reference_config_test.go| 7 +- config/registry_config.go | 27 +- .../registry_config_test.go| 51 ++-- config/service.go | 4 +- config/service_config.go | 41 +-- config/service_config_test.go | 2 +- config/testdata/consumer_config.yml| 15 +- .../testdata/consumer_config_with_configcenter.yml | 4 +- config/testdata/provider_config.yml| 10 +- .../with-configcenter-go-client/app/client.go | 0 .../dubbo/with-configcenter-go-client/app/user.go | 8 +- .../with-configcenter-go-client}/app/version.go| 0 .../assembly/bin/load.sh | 0 .../assembly/common/app.properties | 0 .../assembly/common/build.sh | 0 .../assembly/linux/dev.sh | 0 .../assembly/linux/release.sh | 0 .../assembly/linux/test.sh | 0 .../assembly/mac/dev.sh| 0 .../assembly/mac/release.sh| 0 .../assembly/mac/test.sh | 0 .../assembly/windows/dev.sh| 0 .../assembly/windows/release.sh| 0 .../assembly/windows/test.sh | 0 .../profiles/dev/client.yml| 2 - .../profiles/dev/log.yml | 0 .../profiles/release/client.yml| 2 - .../profiles/release/log.yml | 0 .../profiles/test/client.yml | 2 - .../profiles/test/log.yml | 0 .../with-configcenter-go-server/app/server.go | 0 .../dubbo/with-configcenter-go-server/app/user.go | 12 +- .../with-configcenter-go-server}/app/version.go| 0 .../assembly/bin/load.sh | 0 .../assembly/common/app.properties | 0 .../assembly/common/build.sh | 0 .../assembly/linux/dev.sh | 0 .../assembly/linux/release.sh | 0 .../assembly/linux/test.sh | 0 .../assembly/mac/dev.sh| 0 .../assembly/mac/release.sh| 0 .../assembly/mac/test.sh | 0 .../assembly/windows/dev.sh| 0 .../assembly/windows/release.sh| 0 .../assembly/windows/test.sh | 0 .../profiles/dev/log.yml | 0 .../profiles/dev}/server.yml | 2 - .../profiles/release/log.yml | 0 .../profiles/release}/server.yml | 2 - .../profiles/test/log.yml | 0 .../profiles/test}/server.yml | 2 - .../with-configcenter-go-client/app/client.go | 0 .../with-configcenter-go-client}/app/user.go | 8 +- .../with-configcenter-go-client}/app/version.go| 0 .../assembly/bin/load.sh | 0
[dubbo-spring-boot-project] branch 2.7.x updated (e21ceff -> 32247f9)
This is an automated email from the ASF dual-hosted git repository. mercyblitz pushed a change to branch 2.7.x in repository https://gitbox.apache.org/repos/asf/dubbo-spring-boot-project.git. from e21ceff 2.7.x (#573) add 272331c Merge 2.7.1 to master (#487) add 6601aae Add Nacos Samples (#489) add 3320f2b Update README.md add 43ec541 Update README_CN.md add 23a8c84 Fix build failure (#504) add 58648b7 Update README_CN.md (#483) add e8b9530 fix #503 (#511) add 2960671 2.7.x (#520) add 1494a77 Fix apache/incubator-dubbo-spring-boot-project#169 add 0efa7c9 Merge remote-tracking branch 'upstream/master' add 58e2c91 correct some wrongly written chinese characters in the README_CN.md add 531debd Merge remote-tracking branch 'upstream/master' add 0f93efb Merge remote-tracking branch 'upstream/master' add ac98c7b Remove spring.providers file from starter module (#403) (#404) add d7ff623 add @Override annotation (#409) add a02d6f1 to method reference (#410) add e8f6b8f Update README.md add 5adb2d8 Update README_CN.md add b03d006 Update README_CN.md add 9f5024d Update README.md add d01cf26 0.2.1 (#345) add 7021e60 0.2.1 (#346) add 4cadcb6 0.2.1 (#357) add b5957e5 Remove dubbo-spring-boot-sample-consumer add dae4913 0.2.1 (#360) add 4530413 Merge branch 'master' into 0.2.1 add 84ae184 0.2.1 (#367) add 7ada763 0.2.1 (#372) (#374) add 64095bc 0.2.1 (#378) add 79e9fa8 0.2.1 (#389) add ef626c8 Merge branch 'master' into 0.2.1-release add 859b7ce Merge branch '0.2.x' into master add 30154b5 Update README.md add c98f371 Update README_CN.md add 2dc44c9 Update README.md add b77a096 Update README_CN.md add 9729fa6 0.2.x (#422) add 7d102eb Merge remote-tracking branch 'upstream/master' add 73ad6b9 Sync master to 0.2.x (#417) add d89ef99 Replace ${project.version} to ${revision} in the "pom.xml" files add 3de5a51 Update add c539646 Merge branch 'master' into 0.2.x add 1fea772 Merge remote-tracking branch 'upstream/0.2.x' add 3797561 Merge remote-tracking branch 'upstream/master' add 709d411 Merge branch 'master' into incubator-dubbo-spring-boot-project-branch add a14cd34 Merge pull request #1 from feichangxinfu/incubator-dubbo-spring-boot-project-branch add 033421d Polish apache/incubator-dubbo-spring-boot-project#449 add fa4c06a Polish apache/incubator-dubbo-spring-boot-project#467 : Set "spring.main.allow-bean-definition-overriding" property to be true as default add f705e64 Polish apache/incubator-dubbo-spring-boot-project#468 : Upgrade Dubbo 2.7.1 add a18ed48 Polish apache/incubator-dubbo-spring-boot-project#437 : Remove -XX:PermSize=64m -XX:MaxPermSize=128m add 63d54c1 Fix the issues of test cases add 367d707 Update Samples add 31c6771 Update default version using Dubbo's version add 4c5d205 Polish apache/incubator-dubbo-spring-boot-project#456 : Update the Zookeeper dependencies add 49aef0b Polish apache/incubator-dubbo-spring-boot-project#458 : dubbo.metadata-report.address propertie description not provided add 9429525 Polish apache/incubator-dubbo-spring-boot-project#458 : dubbo.metadata-report.address propertie description not provided add a5815ea Update 2.7.1 add 7bc44d2 Polish apache/incubator-dubbo-spring-boot-project#458 : Add "override" property add 7e0816c Polish apache/incubator-dubbo-spring-boot-project#451 : Duplicate application configs add fda8aca Bugfix add 25f0b03 Update SNAPSHOT add 006cadc Update 2.7.1 add af590e9 Remove uesless files in source code distribution. add bf928e2 Merge branch '2.7.x' into 2.7.x add eb10705 Merge remote-tracking branch 'origin/2.7.x' into 2.7.x add 4014a9c Merge pull request #4 from mercyblitz/2.7.x add a4f21f0 Polish apache/incubator-dubbo-spring-boot-project#488 add 2c7b890 Update ASF License add 98bcc53 Merge branch 'master' into master add d75ba20 Merge branch 'master' into master add ba5794a Update README.md add 0b4819d Update README_CN.md add a231276 Update README_CN.md add 209b856 Update README.md add 6332c98 Update .travis.yml add c585d2d Update pom.xml (#536) add 32247f9 Merge branch 'master' into 2.7.x No new revisions were added by this update. Summary of changes: .travis.yml| 4 +-- README.md | 35 +- ...bboEndpointAnnotationAutoConfigurationTest.java | 2 +- .../DubboRelaxedBinding2AutoConfigurationTest.java | 1 + .../DubboEndpointAutoConfigurationTest.java| 2 +- dubbo-spring-boot-parent/pom.xml | 2 +- .../consumer-sample/pom.xml
[dubbo] branch cloud-native updated: Fix compile problem
This is an automated email from the ASF dual-hosted git repository. liujun pushed a commit to branch cloud-native in repository https://gitbox.apache.org/repos/asf/dubbo.git The following commit(s) were added to refs/heads/cloud-native by this push: new 35e3aea Fix compile problem 35e3aea is described below commit 35e3aea062be8914a9bdd3c95ba001cce75e28ed Author: ken.lj AuthorDate: Fri Aug 9 18:00:31 2019 +0800 Fix compile problem --- .../dubbo/config/spring/schema/DubboNamespaceHandler.java | 13 ++--- .../support/etcd/EtcdDynamicConfigurationTest.java | 4 ++-- .../registry/consul/ConsulServiceDiscoveryFactory.java | 6 +++--- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/schema/DubboNamespaceHandler.java b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/schema/DubboNamespaceHandler.java index 915a9ea..ef62259 100644 --- a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/schema/DubboNamespaceHandler.java +++ b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/schema/DubboNamespaceHandler.java @@ -17,16 +17,15 @@ package org.apache.dubbo.config.spring.schema; import org.apache.dubbo.common.Version; - -import org.apache.dubbo.config.ApplicationConfig; +import org.apache.dubbo.config.ConsumerConfig; import org.apache.dubbo.config.MetadataReportConfig; +import org.apache.dubbo.config.MetricsConfig; import org.apache.dubbo.config.ModuleConfig; -import org.apache.dubbo.config.RegistryConfig; import org.apache.dubbo.config.MonitorConfig; -import org.apache.dubbo.config.MetricsConfig; -import org.apache.dubbo.config.ProviderConfig; -import org.apache.dubbo.config.ConsumerConfig; import org.apache.dubbo.config.ProtocolConfig; +import org.apache.dubbo.config.ProviderConfig; +import org.apache.dubbo.config.RegistryConfig; +import org.apache.dubbo.config.spring.ApplicationBean; import org.apache.dubbo.config.spring.ConfigCenterBean; import org.apache.dubbo.config.spring.ReferenceBean; import org.apache.dubbo.config.spring.ServiceBean; @@ -46,7 +45,7 @@ public class DubboNamespaceHandler extends NamespaceHandlerSupport { @Override public void init() { -registerBeanDefinitionParser("application", new DubboBeanDefinitionParser(ApplicationConfig.class, true)); +registerBeanDefinitionParser("application", new DubboBeanDefinitionParser(ApplicationBean.class, true)); registerBeanDefinitionParser("module", new DubboBeanDefinitionParser(ModuleConfig.class, true)); registerBeanDefinitionParser("registry", new DubboBeanDefinitionParser(RegistryConfig.class, true)); registerBeanDefinitionParser("config-center", new DubboBeanDefinitionParser(ConfigCenterBean.class, true)); diff --git a/dubbo-configcenter/dubbo-configcenter-etcd/src/test/java/org/apache/dubbo/configcenter/support/etcd/EtcdDynamicConfigurationTest.java b/dubbo-configcenter/dubbo-configcenter-etcd/src/test/java/org/apache/dubbo/configcenter/support/etcd/EtcdDynamicConfigurationTest.java index bc4fd68..c0ea8c3 100644 --- a/dubbo-configcenter/dubbo-configcenter-etcd/src/test/java/org/apache/dubbo/configcenter/support/etcd/EtcdDynamicConfigurationTest.java +++ b/dubbo-configcenter/dubbo-configcenter-etcd/src/test/java/org/apache/dubbo/configcenter/support/etcd/EtcdDynamicConfigurationTest.java @@ -58,8 +58,8 @@ public class EtcdDynamicConfigurationTest { put("/dubbo/config/org.apache.dubbo.etcd.testService/configurators", "hello"); put("/dubbo/config/test/dubbo.properties", "aaa=bbb"); -Assert.assertEquals("hello", config.getRule("org.apache.dubbo.etcd.testService.configurators", DynamicConfiguration.DEFAULT_GROUP)); -Assert.assertEquals("aaa=bbb", config.getRule("dubbo.properties", "test")); +Assert.assertEquals("hello", config.getConfig("org.apache.dubbo.etcd.testService.configurators", DynamicConfiguration.DEFAULT_GROUP)); +Assert.assertEquals("aaa=bbb", config.getConfig("dubbo.properties", "test")); } @Test diff --git a/dubbo-registry/dubbo-registry-consul/src/main/java/org/apache/dubbo/registry/consul/ConsulServiceDiscoveryFactory.java b/dubbo-registry/dubbo-registry-consul/src/main/java/org/apache/dubbo/registry/consul/ConsulServiceDiscoveryFactory.java index 189642b..95b4213 100644 --- a/dubbo-registry/dubbo-registry-consul/src/main/java/org/apache/dubbo/registry/consul/ConsulServiceDiscoveryFactory.java +++ b/dubbo-registry/dubbo-registry-consul/src/main/java/org/apache/dubbo/registry/consul/ConsulServiceDiscoveryFactory.java @@ -17,15 +17,15 @@ package org.apache.dubbo.registry.consul; import org.apache.dubbo.common.URL; +import org.apache.dubbo.registry.client.AbstractServiceDiscoveryFactory; import org.apache.dubbo.registry.client.ServiceDiscovery; -import
[dubbo] branch cloud-native updated: refactor, move UT in nacos-registry to config-spring to solve unreasonable module dependency.
This is an automated email from the ASF dual-hosted git repository. liujun pushed a commit to branch cloud-native in repository https://gitbox.apache.org/repos/asf/dubbo.git The following commit(s) were added to refs/heads/cloud-native by this push: new 446dfb9 refactor, move UT in nacos-registry to config-spring to solve unreasonable module dependency. 446dfb9 is described below commit 446dfb9b4cc2aaa708306b7e668b7c3cd8ce668e Author: ken.lj AuthorDate: Fri Aug 9 15:48:39 2019 +0800 refactor, move UT in nacos-registry to config-spring to solve unreasonable module dependency. --- dubbo-config/dubbo-config-spring/pom.xml | 6 ++ .../nacos}/demo/consumer/DemoServiceConsumerBootstrap.java | 6 +++--- .../nacos}/demo/consumer/DemoServiceConsumerXmlBootstrap.java | 6 +++--- .../nacos}/demo/provider/DemoServiceProviderBootstrap.java | 7 +++ .../nacos}/demo/provider/DemoServiceProviderXmlBootstrap.java | 8 +++- .../spring/registry/nacos}/demo/service/DefaultService.java| 2 +- .../spring/registry/nacos}/demo/service/DemoService.java | 2 +- .../spring/registry/nacos}/nacos/NacosServiceNameTest.java | 8 +--- .../resources/META-INF/spring/dubbo-nacos-consumer-context.xml | 0 .../resources/META-INF/spring/dubbo-nacos-provider-context.xml | 0 .../src/test/resources/nacos-consumer-config.properties| 0 .../src/test/resources/nacos-provider-config.properties| 0 dubbo-registry/dubbo-registry-nacos/pom.xml| 10 -- 13 files changed, 25 insertions(+), 30 deletions(-) diff --git a/dubbo-config/dubbo-config-spring/pom.xml b/dubbo-config/dubbo-config-spring/pom.xml index 216c18c..7e6afd2 100644 --- a/dubbo-config/dubbo-config-spring/pom.xml +++ b/dubbo-config/dubbo-config-spring/pom.xml @@ -65,6 +65,12 @@ org.apache.dubbo +dubbo-registry-nacos +${project.parent.version} +test + + +org.apache.dubbo dubbo-monitor-default ${project.parent.version} test diff --git a/dubbo-registry/dubbo-registry-nacos/src/test/java/org/apache/dubbo/demo/consumer/DemoServiceConsumerBootstrap.java b/dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/registry/nacos/demo/consumer/DemoServiceConsumerBootstrap.java similarity index 89% rename from dubbo-registry/dubbo-registry-nacos/src/test/java/org/apache/dubbo/demo/consumer/DemoServiceConsumerBootstrap.java rename to dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/registry/nacos/demo/consumer/DemoServiceConsumerBootstrap.java index f11bdb5..9fefd1c 100644 --- a/dubbo-registry/dubbo-registry-nacos/src/test/java/org/apache/dubbo/demo/consumer/DemoServiceConsumerBootstrap.java +++ b/dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/registry/nacos/demo/consumer/DemoServiceConsumerBootstrap.java @@ -14,11 +14,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.dubbo.demo.consumer; +package org.apache.dubbo.config.spring.registry.nacos.demo.consumer; import org.apache.dubbo.config.annotation.Reference; import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; -import org.apache.dubbo.demo.service.DemoService; +import org.apache.dubbo.config.spring.registry.nacos.demo.service.DemoService; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.PropertySource; @@ -31,7 +31,7 @@ import java.util.concurrent.TimeUnit; * {@link DemoService} consumer demo */ @EnableDubbo -@PropertySource(value = "classpath:/consumer-config.properties") +@PropertySource(value = "classpath:/nacos-consumer-config.properties") public class DemoServiceConsumerBootstrap { @Reference(version = "${demo.service.version}") diff --git a/dubbo-registry/dubbo-registry-nacos/src/test/java/org/apache/dubbo/demo/consumer/DemoServiceConsumerXmlBootstrap.java b/dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/registry/nacos/demo/consumer/DemoServiceConsumerXmlBootstrap.java similarity index 87% rename from dubbo-registry/dubbo-registry-nacos/src/test/java/org/apache/dubbo/demo/consumer/DemoServiceConsumerXmlBootstrap.java rename to dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/registry/nacos/demo/consumer/DemoServiceConsumerXmlBootstrap.java index 8f65faf..3d09603 100644 --- a/dubbo-registry/dubbo-registry-nacos/src/test/java/org/apache/dubbo/demo/consumer/DemoServiceConsumerXmlBootstrap.java +++ b/dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/registry/nacos/demo/consumer/DemoServiceConsumerXmlBootstrap.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions
[dubbo] branch cloud-native updated: spring delegate to bootstrap.
This is an automated email from the ASF dual-hosted git repository. liujun pushed a commit to branch cloud-native in repository https://gitbox.apache.org/repos/asf/dubbo.git The following commit(s) were added to refs/heads/cloud-native by this push: new bdaacbc spring delegate to bootstrap. bdaacbc is described below commit bdaacbc17d8f189c4ebbb34129883e1d0552dfcf Author: ken.lj AuthorDate: Fri Aug 9 15:31:07 2019 +0800 spring delegate to bootstrap. --- .../org/apache/dubbo/bootstrap/DubboBootstrap.java | 83 ++-- .../dubbo/config/AbstractInterfaceConfig.java | 1 + .../apache/dubbo/config/context/ConfigManager.java | 13 dubbo-config/dubbo-config-spring/pom.xml | 5 ++ .../dubbo/config/spring/ApplicationBean.java | 89 ++ .../apache/dubbo/config/spring/ReferenceBean.java | 3 +- .../dubbo-demo-api/dubbo-demo-api-provider/pom.xml | 4 + 7 files changed, 192 insertions(+), 6 deletions(-) diff --git a/dubbo-bootstrap/src/main/java/org/apache/dubbo/bootstrap/DubboBootstrap.java b/dubbo-bootstrap/src/main/java/org/apache/dubbo/bootstrap/DubboBootstrap.java index 005f11d..4189238 100644 --- a/dubbo-bootstrap/src/main/java/org/apache/dubbo/bootstrap/DubboBootstrap.java +++ b/dubbo-bootstrap/src/main/java/org/apache/dubbo/bootstrap/DubboBootstrap.java @@ -30,6 +30,9 @@ import org.apache.dubbo.config.ConfigCenterConfig; import org.apache.dubbo.config.ConsumerConfig; import org.apache.dubbo.config.DubboShutdownHook; import org.apache.dubbo.config.MetadataReportConfig; +import org.apache.dubbo.config.MetricsConfig; +import org.apache.dubbo.config.ModuleConfig; +import org.apache.dubbo.config.MonitorConfig; import org.apache.dubbo.config.ProtocolConfig; import org.apache.dubbo.config.ProviderConfig; import org.apache.dubbo.config.ReferenceConfig; @@ -45,6 +48,7 @@ import org.apache.dubbo.config.builders.RegistryBuilder; import org.apache.dubbo.config.builders.ServiceBuilder; import org.apache.dubbo.config.context.ConfigManager; import org.apache.dubbo.config.metadata.ConfigurableMetadataServiceExporter; +import org.apache.dubbo.config.utils.ReferenceConfigCache; import org.apache.dubbo.event.EventDispatcher; import org.apache.dubbo.event.EventListener; import org.apache.dubbo.metadata.WritableMetadataService; @@ -117,6 +121,8 @@ public class DubboBootstrap { private final ConfigManager configManager = getInstance(); +private ReferenceConfigCache cache; + private volatile boolean initialized = false; private volatile boolean started = false; @@ -148,7 +154,11 @@ public class DubboBootstrap { return this; } -public DubboBootstrap metadataReport(List metadataReportConfigs) { +public DubboBootstrap metadataReports(List metadataReportConfigs) { +if (CollectionUtils.isEmpty(metadataReportConfigs)) { +return this; +} + configManager.addMetadataReports(metadataReportConfigs); return this; } @@ -235,7 +245,10 @@ public class DubboBootstrap { * @param registryConfigs the multiple instances of {@link RegistryConfig} * @return current {@link DubboBootstrap} instance */ -public DubboBootstrap registries(Iterable registryConfigs) { +public DubboBootstrap registries(List registryConfigs) { +if (CollectionUtils.isEmpty(registryConfigs)) { +return this; +} registryConfigs.forEach(this::registry); return this; } @@ -257,6 +270,9 @@ public class DubboBootstrap { } public DubboBootstrap protocols(List protocolConfigs) { +if (CollectionUtils.isEmpty(protocolConfigs)) { +return this; +} configManager.addProtocols(protocolConfigs); return this; } @@ -277,6 +293,14 @@ public class DubboBootstrap { return this; } +public DubboBootstrap services(List serviceConfigs) { +if (CollectionUtils.isEmpty(serviceConfigs)) { +return this; +} +serviceConfigs.forEach(configManager::addService); +return this; +} + // {@link Reference} correlative methods public DubboBootstrap reference(Consumer> consumerBuilder) { return reference(DEFAULT_REFERENCE_ID, consumerBuilder); @@ -293,6 +317,15 @@ public class DubboBootstrap { return this; } +public DubboBootstrap references(List referenceConfigs) { +if (CollectionUtils.isEmpty(referenceConfigs)) { +return this; +} + +referenceConfigs.forEach(configManager::addReference); +return this; +} + // {@link ProviderConfig} correlative methods public DubboBootstrap provider(Consumer builderConsumer) { return provider(DEFAULT_PROVIDER_ID, builderConsumer); @@ -309,6 +342,10 @@ public class DubboBootstrap { } public DubboBootstrap providers(List providerConfigs) { +if