From 9d2ef9a032aef9cd28508992c07aafa7be4e3f01 Mon Sep 17 00:00:00 2001 From: "ken.lj" Date: Fri, 31 Jan 2020 15:51:23 +0800 Subject: [PATCH] fix specifying metadata type cannot work (#5703) fix #5667 --- .../org/apache/dubbo/common/constants/CommonConstants.java | 4 +--- .../main/java/org/apache/dubbo/config/ApplicationConfig.java | 2 ++ .../src/main/resources/spring/dubbo-provider.xml | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/constants/CommonConstants.java b/dubbo-common/src/main/java/org/apache/dubbo/common/constants/CommonConstants.java index ad1d18cd81..b0082e8585 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/constants/CommonConstants.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/constants/CommonConstants.java @@ -168,9 +168,7 @@ public interface CommonConstants { String REVISION_KEY = "revision"; - String METADATA_REVISION = "metadata.revision"; - - String METADATA_KEY = "metadata"; + String METADATA_KEY = "metadata-type"; String DEFAULT_METADATA_STORAGE_TYPE = "local"; diff --git a/dubbo-common/src/main/java/org/apache/dubbo/config/ApplicationConfig.java b/dubbo-common/src/main/java/org/apache/dubbo/config/ApplicationConfig.java index 94495701ad..460dbc6c1b 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/config/ApplicationConfig.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/config/ApplicationConfig.java @@ -36,6 +36,7 @@ import java.util.Set; import static org.apache.dubbo.common.constants.CommonConstants.APPLICATION_KEY; import static org.apache.dubbo.common.constants.CommonConstants.DUMP_DIRECTORY; import static org.apache.dubbo.common.constants.CommonConstants.HOST_KEY; +import static org.apache.dubbo.common.constants.CommonConstants.METADATA_KEY; import static org.apache.dubbo.common.constants.CommonConstants.SHUTDOWN_WAIT_KEY; import static org.apache.dubbo.common.constants.QosConstants.ACCEPT_FOREIGN_IP; import static org.apache.dubbo.common.constants.QosConstants.QOS_ENABLE; @@ -419,6 +420,7 @@ public class ApplicationConfig extends AbstractConfig { return !StringUtils.isEmpty(name); } + @Parameter(key = METADATA_KEY) public String getMetadataType() { return metadataType; } diff --git a/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-provider/src/main/resources/spring/dubbo-provider.xml b/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-provider/src/main/resources/spring/dubbo-provider.xml index 56a07cd2b0..c809ff3867 100644 --- a/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-provider/src/main/resources/spring/dubbo-provider.xml +++ b/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-provider/src/main/resources/spring/dubbo-provider.xml @@ -21,7 +21,8 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd"> - + +