You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2024/10/17 12:43:40 UTC
(servicecomb-java-chassis) branch master updated: [#4560]change return type of create method in DynamicPropertiesSource(#4561)
This is an automated email from the ASF dual-hosted git repository.
liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git
The following commit(s) were added to refs/heads/master by this push:
new 664d314f6 [#4560]change return type of create method in DynamicPropertiesSource(#4561)
664d314f6 is described below
commit 664d314f642374039cf30bcb23290dea5f29f0f3
Author: yinhaox <33...@users.noreply.github.com>
AuthorDate: Thu Oct 17 20:43:35 2024 +0800
[#4560]change return type of create method in DynamicPropertiesSource(#4561)
---
.../servicecomb/config/apollo/ApolloDynamicPropertiesSource.java | 3 ++-
.../servicecomb/config/cc/ConfigCenterDynamicPropertiesSource.java | 3 ++-
.../org/apache/servicecomb/config/kie/KieDynamicPropertiesSource.java | 3 ++-
.../apache/servicecomb/config/nacos/NacosDynamicPropertiesSource.java | 3 ++-
.../config/zookeeper/ZookeeperDynamicPropertiesSource.java | 3 ++-
.../java/org/apache/servicecomb/config/DynamicPropertiesSource.java | 4 ++--
.../apache/servicecomb/config/InMemoryDynamicPropertiesSource.java | 3 ++-
7 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/dynamic-config/config-apollo/src/main/java/org/apache/servicecomb/config/apollo/ApolloDynamicPropertiesSource.java b/dynamic-config/config-apollo/src/main/java/org/apache/servicecomb/config/apollo/ApolloDynamicPropertiesSource.java
index 935877fcc..4a1113283 100644
--- a/dynamic-config/config-apollo/src/main/java/org/apache/servicecomb/config/apollo/ApolloDynamicPropertiesSource.java
+++ b/dynamic-config/config-apollo/src/main/java/org/apache/servicecomb/config/apollo/ApolloDynamicPropertiesSource.java
@@ -29,6 +29,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.env.Environment;
import org.springframework.core.env.MapPropertySource;
+import org.springframework.core.env.PropertySource;
public class ApolloDynamicPropertiesSource implements DynamicPropertiesSource {
public static final String SOURCE_NAME = "apollo";
@@ -75,7 +76,7 @@ public class ApolloDynamicPropertiesSource implements DynamicPropertiesSource {
}
@Override
- public MapPropertySource create(Environment environment) {
+ public PropertySource<?> create(Environment environment) {
init(environment);
return new MapPropertySource(SOURCE_NAME, valueCache);
}
diff --git a/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/cc/ConfigCenterDynamicPropertiesSource.java b/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/cc/ConfigCenterDynamicPropertiesSource.java
index 961d1d1ec..431963da6 100644
--- a/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/cc/ConfigCenterDynamicPropertiesSource.java
+++ b/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/cc/ConfigCenterDynamicPropertiesSource.java
@@ -49,6 +49,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.env.Environment;
import org.springframework.core.env.MapPropertySource;
+import org.springframework.core.env.PropertySource;
import com.google.common.eventbus.Subscribe;
@@ -181,7 +182,7 @@ public class ConfigCenterDynamicPropertiesSource implements DynamicPropertiesSou
}
@Override
- public MapPropertySource create(Environment environment) {
+ public PropertySource<?> create(Environment environment) {
init(environment);
return new MapPropertySource(SOURCE_NAME, data);
}
diff --git a/dynamic-config/config-kie/src/main/java/org/apache/servicecomb/config/kie/KieDynamicPropertiesSource.java b/dynamic-config/config-kie/src/main/java/org/apache/servicecomb/config/kie/KieDynamicPropertiesSource.java
index ba7440a5a..716579692 100644
--- a/dynamic-config/config-kie/src/main/java/org/apache/servicecomb/config/kie/KieDynamicPropertiesSource.java
+++ b/dynamic-config/config-kie/src/main/java/org/apache/servicecomb/config/kie/KieDynamicPropertiesSource.java
@@ -48,6 +48,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.env.Environment;
import org.springframework.core.env.MapPropertySource;
+import org.springframework.core.env.PropertySource;
import com.google.common.eventbus.Subscribe;
@@ -163,7 +164,7 @@ public class KieDynamicPropertiesSource implements DynamicPropertiesSource {
}
@Override
- public MapPropertySource create(Environment environment) {
+ public PropertySource<?> create(Environment environment) {
init(environment);
return new MapPropertySource(SOURCE_NAME, data);
}
diff --git a/dynamic-config/config-nacos/src/main/java/org/apache/servicecomb/config/nacos/NacosDynamicPropertiesSource.java b/dynamic-config/config-nacos/src/main/java/org/apache/servicecomb/config/nacos/NacosDynamicPropertiesSource.java
index f170408d4..308b63376 100644
--- a/dynamic-config/config-nacos/src/main/java/org/apache/servicecomb/config/nacos/NacosDynamicPropertiesSource.java
+++ b/dynamic-config/config-nacos/src/main/java/org/apache/servicecomb/config/nacos/NacosDynamicPropertiesSource.java
@@ -26,6 +26,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.env.Environment;
import org.springframework.core.env.MapPropertySource;
+import org.springframework.core.env.PropertySource;
public class NacosDynamicPropertiesSource implements DynamicPropertiesSource {
public static final String SOURCE_NAME = "nacos";
@@ -60,7 +61,7 @@ public class NacosDynamicPropertiesSource implements DynamicPropertiesSource {
}
@Override
- public MapPropertySource create(Environment environment) {
+ public PropertySource<?> create(Environment environment) {
init(environment);
return new MapPropertySource(SOURCE_NAME, valueCache);
}
diff --git a/dynamic-config/config-zookeeper/src/main/java/org/apache/servicecomb/config/zookeeper/ZookeeperDynamicPropertiesSource.java b/dynamic-config/config-zookeeper/src/main/java/org/apache/servicecomb/config/zookeeper/ZookeeperDynamicPropertiesSource.java
index 7d317aa3d..a971ea584 100644
--- a/dynamic-config/config-zookeeper/src/main/java/org/apache/servicecomb/config/zookeeper/ZookeeperDynamicPropertiesSource.java
+++ b/dynamic-config/config-zookeeper/src/main/java/org/apache/servicecomb/config/zookeeper/ZookeeperDynamicPropertiesSource.java
@@ -26,6 +26,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.env.Environment;
import org.springframework.core.env.MapPropertySource;
+import org.springframework.core.env.PropertySource;
public class ZookeeperDynamicPropertiesSource implements DynamicPropertiesSource {
public static final String SOURCE_NAME = "zookeeper";
@@ -60,7 +61,7 @@ public class ZookeeperDynamicPropertiesSource implements DynamicPropertiesSource
}
@Override
- public MapPropertySource create(Environment environment) {
+ public PropertySource<?> create(Environment environment) {
init(environment);
return new MapPropertySource(SOURCE_NAME, valueCache);
}
diff --git a/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/DynamicPropertiesSource.java b/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/DynamicPropertiesSource.java
index 87af7f66f..8634bff29 100644
--- a/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/DynamicPropertiesSource.java
+++ b/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/DynamicPropertiesSource.java
@@ -18,11 +18,11 @@ package org.apache.servicecomb.config;
import org.springframework.core.Ordered;
import org.springframework.core.env.Environment;
-import org.springframework.core.env.MapPropertySource;
+import org.springframework.core.env.PropertySource;
/**
* SPI to add new DynamicPropertiesSource.
*/
public interface DynamicPropertiesSource extends Ordered {
- MapPropertySource create(Environment environment);
+ PropertySource<?> create(Environment environment);
}
diff --git a/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/InMemoryDynamicPropertiesSource.java b/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/InMemoryDynamicPropertiesSource.java
index 8ce73d727..f6139af0a 100644
--- a/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/InMemoryDynamicPropertiesSource.java
+++ b/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/InMemoryDynamicPropertiesSource.java
@@ -22,6 +22,7 @@ import java.util.Map;
import org.apache.servicecomb.foundation.common.event.EventManager;
import org.springframework.core.env.Environment;
import org.springframework.core.env.MapPropertySource;
+import org.springframework.core.env.PropertySource;
/**
* This DynamicPropertiesSource is created for easier system tests.
@@ -32,7 +33,7 @@ public class InMemoryDynamicPropertiesSource implements DynamicPropertiesSource
private static final Map<String, Object> DYNAMIC = new HashMap<>();
@Override
- public MapPropertySource create(Environment environment) {
+ public PropertySource<?> create(Environment environment) {
return new MapPropertySource(SOURCE_NAME, DYNAMIC);
}