class ConfigurationSpringInitializer extends PropertyPlaceholderConfigurer implements EnvironmentAware {

  @Override
  public void setEnvironment(Environment environment) {
    String environmentName = generateNameForEnvironment(environment);
    LOGGER.info("Environment received, will get configurations from [{}].", environmentName);

    Map<String, Object> extraConfig = getAllProperties(environment);

    ConfigUtil.addExtraConfig(EXTRA_CONFIG_SOURCE_PREFIX + environmentName, extraConfig);

    ConfigUtil.installDynamicConfig();

    setUpSpringPropertySource(environment);
  }

  public  ConfigurationSpringInitializer();

}