diff --git a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/config/impl/DefaultConsoleDbConfig.java b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/config/impl/DefaultConsoleDbConfig.java
index bad37e984..3f13c1a86 100644
--- a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/config/impl/DefaultConsoleDbConfig.java
+++ b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/config/impl/DefaultConsoleDbConfig.java
@@ -19,15 +19,12 @@
*
* Jun 15, 2017
*/
-public class DefaultConsoleDbConfig extends AbstractConfigBean implements ConsoleDbConfig, AlertDbConfig {
+public class DefaultConsoleDbConfig implements ConsoleDbConfig, AlertDbConfig {
private TimeBoundCache> sentinelCheckWhitelistCache;
private TimeBoundCache> clusterAlertWhitelistCache;
- @Autowired
- private DbConfig dbConfig;
-
@Autowired
private ConsoleConfig config;
@@ -36,8 +33,6 @@ public class DefaultConsoleDbConfig extends AbstractConfigBean implements Consol
@PostConstruct
public void postConstruct(){
- setConfig(dbConfig);
-
sentinelCheckWhitelistCache = new TimeBoundCache<>(config::getCacheRefreshInterval, this::refreshSentinelCheckWhiteList);
clusterAlertWhitelistCache = new TimeBoundCache<>(config::getCacheRefreshInterval, this::refreshClusterAlertWhiteList);
}
diff --git a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/healthcheck/nonredis/console/AlertSystemOffChecker.java b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/healthcheck/nonredis/console/AlertSystemOffChecker.java
index b6ad6d8e8..edc70b68e 100644
--- a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/healthcheck/nonredis/console/AlertSystemOffChecker.java
+++ b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/healthcheck/nonredis/console/AlertSystemOffChecker.java
@@ -1,7 +1,6 @@
package com.ctrip.xpipe.redis.console.healthcheck.nonredis.console;
import com.ctrip.xpipe.redis.checker.alert.ALERT_TYPE;
-import com.ctrip.xpipe.redis.console.config.impl.DefaultConsoleDbConfig;
import com.ctrip.xpipe.redis.console.model.ConfigModel;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
diff --git a/services/ctrip-service/src/main/java/com/ctrip/xpipe/service/datasource/DataSourceConfig.java b/services/ctrip-service/src/main/java/com/ctrip/xpipe/service/datasource/DataSourceConfig.java
index 49739d9f0..f179b6f03 100644
--- a/services/ctrip-service/src/main/java/com/ctrip/xpipe/service/datasource/DataSourceConfig.java
+++ b/services/ctrip-service/src/main/java/com/ctrip/xpipe/service/datasource/DataSourceConfig.java
@@ -1,7 +1,10 @@
package com.ctrip.xpipe.service.datasource;
+import com.ctrip.xpipe.api.config.ConfigProvider;
import com.ctrip.xpipe.config.AbstractConfigBean;
+import static com.ctrip.xpipe.api.config.ConfigProvider.COMMON_CONFIG;
+
/**
* @author lishanglin
* date 2021/4/13
@@ -10,6 +13,10 @@ public class DataSourceConfig extends AbstractConfigBean {
public static final String KEY_DATASOURCE_CLUSTER = "dal.datasource.cluster";
+ public DataSourceConfig() {
+ super(ConfigProvider.DEFAULT.getOrCreateConfig(COMMON_CONFIG));
+ }
+
public String getClusterName() {
return getProperty(KEY_DATASOURCE_CLUSTER, "fxxpipedb_dalcluster");
}