You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by me...@apache.org on 2020/04/26 09:09:13 UTC

[dubbo] branch master updated: [Enhancement] Take the "name" property of Dubbo Config as Spring Bean If its "id" property is blank[Enhancement] Take the "name" property of Dubbo Config as Spring Bean If its "id" property is blank (#6063)

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

mercyblitz 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 e956171  [Enhancement] Take the "name" property of Dubbo Config as Spring Bean If its "id" property is blank[Enhancement] Take the "name" property of Dubbo Config as Spring Bean If its "id" property is blank (#6063)
e956171 is described below

commit e9561717bbd1623f6189ec8735173d6a10062a4a
Author: Mercy Ma <me...@gmail.com>
AuthorDate: Sun Apr 26 17:08:56 2020 +0800

    [Enhancement] Take the "name" property of Dubbo Config as Spring Bean If its "id" property is blank[Enhancement] Take the "name" property of Dubbo Config as Spring Bean If its "id" property is blank (#6063)
    
    * Polish apache/dubbo#6058 : [Enhancement] Adding a build tools module for Apache License
    
    * Polish apache/dubbo#6058 : [Enhancement] Adding a build tools module for Apache License
    
    * Polish apache/dubbo#6058 : [Enhancement] Adding a build tools module for Apache License
    
    * Polish apache/dubbo#6051 : [Enhancement] Take the "name" property of Dubbo Config as Spring Bean If its "id" property is blank
    
    * Polish apache/dubbo#6051 : [Enhancement] Take the "name" property of Dubbo Config as Spring Bean If its "id" property is blank
---
 .../dubbo/config/spring/context/annotation/EnableDubboConfigTest.java  | 3 +--
 .../dubbo-config-spring/src/test/resources/META-INF/config.properties  | 1 -
 .../src/test/resources/META-INF/dubbo-provider.properties              | 1 -
 3 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/context/annotation/EnableDubboConfigTest.java b/dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/context/annotation/EnableDubboConfigTest.java
index d3c969d..5817185 100644
--- a/dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/context/annotation/EnableDubboConfigTest.java
+++ b/dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/context/annotation/EnableDubboConfigTest.java
@@ -107,9 +107,8 @@ public class EnableDubboConfigTest {
         Map<String, ProtocolConfig> protocolConfigs = context.getBeansOfType(ProtocolConfig.class);
 
         for (Map.Entry<String, ProtocolConfig> entry : protocolConfigs.entrySet()) {
-            String beanName = entry.getKey();
             ProtocolConfig protocol = entry.getValue();
-            Assert.assertEquals(beanName, protocol.getName());
+            Assert.assertEquals(protocol, context.getBean(protocol.getName(), ProtocolConfig.class));
         }
 
         // asserts aliases
diff --git a/dubbo-config/dubbo-config-spring/src/test/resources/META-INF/config.properties b/dubbo-config/dubbo-config-spring/src/test/resources/META-INF/config.properties
index aa79925..22d06ae 100644
--- a/dubbo-config/dubbo-config-spring/src/test/resources/META-INF/config.properties
+++ b/dubbo-config/dubbo-config-spring/src/test/resources/META-INF/config.properties
@@ -14,7 +14,6 @@ dubbo.module.name = dubbo-demo-module
 dubbo.registry.address = zookeeper://192.168.99.100:32770
 
 ## protocol
-dubbo.protocol.id = dubbo
 dubbo.protocol.name = dubbo
 dubbo.protocol.port = 20880
 
diff --git a/dubbo-config/dubbo-config-spring/src/test/resources/META-INF/dubbo-provider.properties b/dubbo-config/dubbo-config-spring/src/test/resources/META-INF/dubbo-provider.properties
index 812044c..0cbed90 100644
--- a/dubbo-config/dubbo-config-spring/src/test/resources/META-INF/dubbo-provider.properties
+++ b/dubbo-config/dubbo-config-spring/src/test/resources/META-INF/dubbo-provider.properties
@@ -19,7 +19,6 @@ dubbo.registry.id = my-registry
 dubbo.registry.address = N/A
 
 ### <dubbo:protocol name="dubbo" port="12345"/>
-dubbo.protocol.id = dubbo
 dubbo.protocol.name = dubbo
 dubbo.protocol.port = 12345
 dubbo.monitor.address=N/A
\ No newline at end of file