-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
客户端读到老数据 #63
Comments
Config 和 ConfigFile 是两个不同的对象,独立更新的,代码改成这样应该就一致了 ConfigService.getAppConfig().addChangeListener(new ConfigChangeListener() {
@Override
public void onChange(ConfigChangeEvent configChangeEvent) {
String newValue = configChangeEvent.getChange("someKey").getNewValue();
System.out.println("event-: ");
System.out.println(newValue);
String somekey = ConfigService.getAppConfig().getProperty("someKey", "");
System.out.println("configservice-: ");
System.out.println(somekey);
}
});
ConfigService.getConfigFile("application", ConfigFileFormat.Properties).addChangeListener(new ConfigFileChangeListener() {
@Override
public void onChange(ConfigFileChangeEvent changeEvent) {
System.out.println("-----------------");
System.out.println("event-: ");
String newValue = changeEvent.getNewValue();
System.out.println(newValue);
String application = ConfigService.getConfigFile("application", ConfigFileFormat.Properties).getContent();
System.out.println("configservice-: ");
System.out.println(application);
}
}); |
可以将DefaultConfig和PropertiesConfigFile的同名namespace的Repository合并吗,感觉可行 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
当config监听器中使用configfile去获取配置时,读到老的配置,是同一个namespace
The text was updated successfully, but these errors were encountered: