apollo-demo/src/main/java/com/ctrip/framework/apollo/demo/api/ApolloConfigDemo.java/ApolloConfigDemo/ApolloConfigDemo
class ApolloConfigDemo:  public ApolloConfigDemo() {
    ConfigChangeListener changeListener = new ConfigChangeListener() {
      @Override
      public void onChange(ConfigChangeEvent changeEvent) {
        logger.info("Changes for namespace {}", changeEvent.getNamespace());
        for (String key : changeEvent.changedKeys()) {
          ConfigChange change = changeEvent.getChange(key);
          logger.info("Change - key: {}, oldValue: {}, newValue: {}, changeType: {}",
              change.getPropertyName(), change.getOldValue(), change.getNewValue(),
              change.getChangeType());
        }
      }
    };
    config = ConfigService.getAppConfig();
    config.addChangeListener(changeListener);
    yamlConfig = ConfigService.getConfig("application.yaml");
    yamlConfig.addChangeListener(changeListener);
    publicConfig = ConfigService.getConfig("TEST1.apollo");
    publicConfig.addChangeListener(changeListener);
    applicationConfigFile = ConfigService.getConfigFile("application", ConfigFileFormat.Properties);
    // datasources.xml
    xmlConfigFile = ConfigService.getConfigFile("datasources", ConfigFileFormat.XML);
    xmlConfigFile.addChangeListener(new ConfigFileChangeListener() {
      @Override
      public void onChange(ConfigFileChangeEvent changeEvent) {
        logger.info(changeEvent.toString());
      }
    });
    // application.yaml
    yamlConfigFile = (YamlConfigFile) ConfigService.getConfigFile("application", ConfigFileFormat.YAML);
  }