Commit 365d443b by qiuweili123

增加配置

parent 48eb8a24
......@@ -9,6 +9,8 @@ import org.springframework.core.Ordered;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.util.StringUtils;
import java.util.Optional;
/**
* @author qianglu
*/
......@@ -31,6 +33,9 @@ public class ApolloContextInitializer implements ApplicationContextInitializer<C
System.setProperty("apollo.bootstrap.eagerLoad.enabled", "true");
System.setProperty("apollo.bootstrap.namespaces", namespaces);
}
//设置全局环境变量参数,如果存在springboot的配置,则进行全局
Optional.ofNullable(environment.getProperty("spring.profiles.active")).ifPresent(env->System.setProperty("env",env));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment