fix specifying metadata type cannot work (#5703)

fix #5667
This commit is contained in:
ken.lj 2020-01-31 15:51:23 +08:00 committed by GitHub
parent 457b04dcf5
commit 9d2ef9a032
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -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";

View File

@ -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;
}

View File

@ -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">
<dubbo:application name="demo-provider"/>
<dubbo:application metadata-type="remote" name="demo-provider"/>
<dubbo:metadata-report address="zookeeper://127.0.0.1:2181"/>
<dubbo:registry address="zookeeper://127.0.0.1:2181"/>