|
|
|
@ -55,17 +55,20 @@ public class MetadataContext {
|
|
|
|
|
private final Map<String, String> systemMetadata;
|
|
|
|
|
|
|
|
|
|
static {
|
|
|
|
|
String namespace = ApplicationContextAwareUtils.getProperties("spring.cloud.polaris.namespace");
|
|
|
|
|
String namespace = ApplicationContextAwareUtils
|
|
|
|
|
.getProperties("spring.cloud.polaris.namespace");
|
|
|
|
|
if (StringUtils.isEmpty(namespace)) {
|
|
|
|
|
namespace = ApplicationContextAwareUtils.getProperties("spring.cloud.polaris.discovery.namespace", "default");
|
|
|
|
|
namespace = ApplicationContextAwareUtils
|
|
|
|
|
.getProperties("spring.cloud.polaris.discovery.namespace", "default");
|
|
|
|
|
}
|
|
|
|
|
LOCAL_NAMESPACE = namespace;
|
|
|
|
|
|
|
|
|
|
String serviceName = ApplicationContextAwareUtils.getProperties("spring.cloud.polaris.service");
|
|
|
|
|
String serviceName = ApplicationContextAwareUtils
|
|
|
|
|
.getProperties("spring.cloud.polaris.service");
|
|
|
|
|
if (StringUtils.isEmpty(serviceName)) {
|
|
|
|
|
serviceName = ApplicationContextAwareUtils.getProperties(
|
|
|
|
|
"spring.cloud.polaris.discovery.service",
|
|
|
|
|
ApplicationContextAwareUtils.getProperties("spring.application.name", null));
|
|
|
|
|
"spring.cloud.polaris.discovery.service", ApplicationContextAwareUtils
|
|
|
|
|
.getProperties("spring.application.name", null));
|
|
|
|
|
}
|
|
|
|
|
LOCAL_SERVICE = serviceName;
|
|
|
|
|
}
|
|
|
|
|