本文整理汇总了Java中org.springframework.boot.env.EnvironmentPostProcessor类的典型用法代码示例。如果您正苦于以下问题:Java EnvironmentPostProcessor类的具体用法?Java EnvironmentPostProcessor怎么用?Java EnvironmentPostProcessor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EnvironmentPostProcessor类属于org.springframework.boot.env包,在下文中一共展示了EnvironmentPostProcessor类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onApplicationEnvironmentPreparedEvent
import org.springframework.boot.env.EnvironmentPostProcessor; //导入依赖的package包/类
private void onApplicationEnvironmentPreparedEvent(
ApplicationEnvironmentPreparedEvent event) {
List<EnvironmentPostProcessor> postProcessors = loadPostProcessors();
postProcessors.add(this);
AnnotationAwareOrderComparator.sort(postProcessors);
for (EnvironmentPostProcessor postProcessor : postProcessors) {
postProcessor.postProcessEnvironment(event.getEnvironment(),
event.getSpringApplication());
}
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:11,代码来源:ConfigFileApplicationListener.java
示例2: loadPostProcessors
import org.springframework.boot.env.EnvironmentPostProcessor; //导入依赖的package包/类
List<EnvironmentPostProcessor> loadPostProcessors() {
return SpringFactoriesLoader.loadFactories(EnvironmentPostProcessor.class,
getClass().getClassLoader());
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:5,代码来源:ConfigFileApplicationListener.java
示例3: loadPostProcessors
import org.springframework.boot.env.EnvironmentPostProcessor; //导入依赖的package包/类
@Override
List<EnvironmentPostProcessor> loadPostProcessors() {
return new ArrayList<EnvironmentPostProcessor>(
Arrays.asList(new LowestPrecedenceEnvironmentPostProcessor()));
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:6,代码来源:ConfigFileApplicationListenerTests.java