Skip to content

Commit

Permalink
fix bug for consumer application.properties
Browse files Browse the repository at this point in the history
  • Loading branch information
qifanwang committed Aug 7, 2024
1 parent 681f100 commit afdf916
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,12 @@
* <p>
* Jun 15, 2017
*/
public class DefaultConsoleDbConfig extends AbstractConfigBean implements ConsoleDbConfig, AlertDbConfig {
public class DefaultConsoleDbConfig implements ConsoleDbConfig, AlertDbConfig {

private TimeBoundCache<Set<String>> sentinelCheckWhitelistCache;

private TimeBoundCache<Set<String>> clusterAlertWhitelistCache;

@Autowired
private DbConfig dbConfig;

@Autowired
private ConsoleConfig config;

Expand All @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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");
}
Expand Down

0 comments on commit afdf916

Please sign in to comment.