1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

Merge pull request #1311 from lcg72/master

Fix #1310 Compatible with Dubbo 2.7.5
This commit is contained in:
Mercy Ma 2020-04-02 21:47:24 +08:00 committed by GitHub
commit 7fb277e06a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
import org.springframework.util.StringUtils;
import static com.alibaba.cloud.dubbo.registry.SpringCloudRegistryFactory.PROTOCOL;
import static org.apache.dubbo.config.spring.util.PropertySourcesUtils.getPrefixedProperties;
import static com.alibaba.spring.util.PropertySourcesUtils.getSubProperties;
/**
* Missing {@link SpringCloudRegistry} Property {@link Condition}.
@ -61,7 +61,7 @@ public class MissingSpringCloudRegistryConfigPropertyCondition
"'spring-cloud' protocol was found from 'dubbo.registry.address'");
}
Map<String, Object> properties = getPrefixedProperties(
Map<String, Object> properties = getSubProperties(
environment.getPropertySources(), "dubbo.registries.");
boolean found = properties.entrySet().stream().anyMatch(entry -> {

View File

@ -34,8 +34,8 @@ import org.springframework.core.env.PropertySource;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import static com.alibaba.spring.util.PropertySourcesUtils.getSubProperties;
import static org.apache.dubbo.common.constants.CommonConstants.DEFAULT_PROTOCOL;
import static org.apache.dubbo.config.spring.util.PropertySourcesUtils.getPrefixedProperties;
/**
* Dubbo {@link WebApplicationType#NONE Non-Web Application}
@ -149,7 +149,7 @@ public class DubboNonWebApplicationEnvironmentPostProcessor
String restPort = null;
Map<String, Object> subProperties = getPrefixedProperties(
Map<String, Object> subProperties = getSubProperties(
environment.getPropertySources(), PROTOCOLS_PROPERTY_NAME_PREFIX);
Properties properties = new Properties();