@Test public void testFillFromEnvironmentWithNoPropertyFromEnvironment() throws Exception { ConfigurableEnvironment environment = mock(ConfigurableEnvironment.class); apolloApplicationContextInitializer.initializeSystemProperty(environment); assertNull(System.getProperty("app.id")); assertNull(System.getProperty(ConfigConsts.APOLLO_CLUSTER_KEY)); assertNull(System.getProperty("apollo.cacheDir")); assertNull(System.getProperty(ConfigConsts.APOLLO_META_KEY)); }
void initializeSystemProperty(ConfigurableEnvironment environment) { for (String propertyName : APOLLO_SYSTEM_PROPERTIES) { fillSystemPropertyFromEnvironment(environment, propertyName); } }
ApolloApplicationContextInitializer implements
    ApplicationContextInitializer<ConfigurableApplicationContext> , EnvironmentPostProcessor, Ordered { void initializeSystemProperty(ConfigurableEnvironment environment) { for (String propertyName : APOLLO_SYSTEM_PROPERTIES) { fillSystemPropertyFromEnvironment(environment, propertyName); } } }
ApolloApplicationContextInitializer implements
    ApplicationContextInitializer<ConfigurableApplicationContext> , EnvironmentPostProcessor, Ordered { void initializeSystemProperty(ConfigurableEnvironment environment) { for (String propertyName : APOLLO_SYSTEM_PROPERTIES) { fillSystemPropertyFromEnvironment(environment, propertyName); } }  }
ApolloApplicationContextInitializer implements
    ApplicationContextInitializer<ConfigurableApplicationContext> , EnvironmentPostProcessor, Ordered { void initializeSystemProperty(ConfigurableEnvironment environment) { for (String propertyName : APOLLO_SYSTEM_PROPERTIES) { fillSystemPropertyFromEnvironment(environment, propertyName); } }  @Override void initialize(ConfigurableApplicationContext context); @Override void postProcessEnvironment(ConfigurableEnvironment configurableEnvironment, SpringApplication springApplication); @Override int getOrder(); void setOrder(int order); }
ApolloApplicationContextInitializer implements
    ApplicationContextInitializer<ConfigurableApplicationContext> , EnvironmentPostProcessor, Ordered { void initializeSystemProperty(ConfigurableEnvironment environment) { for (String propertyName : APOLLO_SYSTEM_PROPERTIES) { fillSystemPropertyFromEnvironment(environment, propertyName); } }  @Override void initialize(ConfigurableApplicationContext context); @Override void postProcessEnvironment(ConfigurableEnvironment configurableEnvironment, SpringApplication springApplication); @Override int getOrder(); void setOrder(int order); static final int DEFAULT_ORDER; }