mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
Fix #1310 Compatible with Dubbo 2.7.5
This commit is contained in:
parent
264e208da7
commit
859d0ff6d3
@ -29,7 +29,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
|
|||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import static com.alibaba.cloud.dubbo.registry.SpringCloudRegistryFactory.PROTOCOL;
|
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}.
|
* Missing {@link SpringCloudRegistry} Property {@link Condition}.
|
||||||
@ -61,7 +61,7 @@ public class MissingSpringCloudRegistryConfigPropertyCondition
|
|||||||
"'spring-cloud' protocol was found from 'dubbo.registry.address'");
|
"'spring-cloud' protocol was found from 'dubbo.registry.address'");
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, Object> properties = getPrefixedProperties(
|
Map<String, Object> properties = getSubProperties(
|
||||||
environment.getPropertySources(), "dubbo.registries.");
|
environment.getPropertySources(), "dubbo.registries.");
|
||||||
|
|
||||||
boolean found = properties.entrySet().stream().anyMatch(entry -> {
|
boolean found = properties.entrySet().stream().anyMatch(entry -> {
|
||||||
|
@ -35,7 +35,7 @@ import org.springframework.util.CollectionUtils;
|
|||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import static org.apache.dubbo.common.constants.CommonConstants.DEFAULT_PROTOCOL;
|
import static org.apache.dubbo.common.constants.CommonConstants.DEFAULT_PROTOCOL;
|
||||||
import static org.apache.dubbo.config.spring.util.PropertySourcesUtils.getPrefixedProperties;
|
import static com.alibaba.spring.util.PropertySourcesUtils.getSubProperties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dubbo {@link WebApplicationType#NONE Non-Web Application}
|
* Dubbo {@link WebApplicationType#NONE Non-Web Application}
|
||||||
@ -149,7 +149,7 @@ public class DubboNonWebApplicationEnvironmentPostProcessor
|
|||||||
|
|
||||||
String restPort = null;
|
String restPort = null;
|
||||||
|
|
||||||
Map<String, Object> subProperties = getPrefixedProperties(
|
Map<String, Object> subProperties = getSubProperties(
|
||||||
environment.getPropertySources(), PROTOCOLS_PROPERTY_NAME_PREFIX);
|
environment.getPropertySources(), PROTOCOLS_PROPERTY_NAME_PREFIX);
|
||||||
|
|
||||||
Properties properties = new Properties();
|
Properties properties = new Properties();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user