当前位置: 首页>>代码示例>>Java>>正文


Java SpringFactoriesLoader.loadFactories方法代码示例

本文整理汇总了Java中org.springframework.core.io.support.SpringFactoriesLoader.loadFactories方法的典型用法代码示例。如果您正苦于以下问题:Java SpringFactoriesLoader.loadFactories方法的具体用法?Java SpringFactoriesLoader.loadFactories怎么用?Java SpringFactoriesLoader.loadFactories使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.core.io.support.SpringFactoriesLoader的用法示例。


在下文中一共展示了SpringFactoriesLoader.loadFactories方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getMatchOutcome

import org.springframework.core.io.support.SpringFactoriesLoader; //导入方法依赖的package包/类
@Override
public ConditionOutcome getMatchOutcome(ConditionContext context,
		AnnotatedTypeMetadata metadata) {
	List<TemplateAvailabilityProvider> availabilityProviders = SpringFactoriesLoader
			.loadFactories(TemplateAvailabilityProvider.class,
					context.getClassLoader());

	for (TemplateAvailabilityProvider availabilityProvider : availabilityProviders) {
		if (availabilityProvider.isTemplateAvailable("error",
				context.getEnvironment(), context.getClassLoader(),
				context.getResourceLoader())) {
			return ConditionOutcome.noMatch("Template from "
					+ availabilityProvider + " found for error view");
		}
	}

	return ConditionOutcome.match("No error template view detected");
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:19,代码来源:ErrorMvcAutoConfiguration.java

示例2: PropertySourcesLoader

import org.springframework.core.io.support.SpringFactoriesLoader; //导入方法依赖的package包/类
/**
 * Create a new {@link PropertySourceLoader} instance backed by the specified
 * {@link MutablePropertySources}.
 * @param propertySources the destination property sources
 */
public PropertySourcesLoader(MutablePropertySources propertySources) {
	Assert.notNull(propertySources, "PropertySources must not be null");
	this.propertySources = propertySources;
	this.loaders = SpringFactoriesLoader.loadFactories(PropertySourceLoader.class,
			getClass().getClassLoader());
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:12,代码来源:PropertySourcesLoader.java

示例3: analyzeAndReport

import org.springframework.core.io.support.SpringFactoriesLoader; //导入方法依赖的package包/类
public static boolean analyzeAndReport(Throwable failure, ClassLoader classLoader,
		ConfigurableApplicationContext context) {
	List<FailureAnalyzer> analyzers = SpringFactoriesLoader
			.loadFactories(FailureAnalyzer.class, classLoader);
	List<FailureAnalysisReporter> reporters = SpringFactoriesLoader
			.loadFactories(FailureAnalysisReporter.class, classLoader);
	FailureAnalysis analysis = analyze(failure, analyzers, context);
	return report(analysis, reporters);
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:10,代码来源:FailureAnalyzers.java

示例4: onApplicationEvent

import org.springframework.core.io.support.SpringFactoriesLoader; //导入方法依赖的package包/类
@Override
public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) {
	List<EnvironmentPostProcessor> postProcessors = SpringFactoriesLoader
			.loadFactories(EnvironmentPostProcessor.class,
					getClass().getClassLoader());
	for (EnvironmentPostProcessor postProcessor : postProcessors) {
		postProcessor.postProcessEnvironment(event.getEnvironment(),
				event.getSpringApplication());
	}
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:11,代码来源:EnvironmentPostProcessingApplicationListener.java

示例5: loadPostProcessors

import org.springframework.core.io.support.SpringFactoriesLoader; //导入方法依赖的package包/类
List<EnvironmentPostProcessor> loadPostProcessors() {
	return SpringFactoriesLoader.loadFactories(EnvironmentPostProcessor.class,
			getClass().getClassLoader());
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:5,代码来源:ConfigFileApplicationListener.java

示例6: TemplateAvailabilityProviders

import org.springframework.core.io.support.SpringFactoriesLoader; //导入方法依赖的package包/类
/**
 * Create a new {@link TemplateAvailabilityProviders} instance.
 * @param classLoader the source class loader
 */
public TemplateAvailabilityProviders(ClassLoader classLoader) {
	Assert.notNull(classLoader, "ClassLoader must not be null");
	this.providers = SpringFactoriesLoader
			.loadFactories(TemplateAvailabilityProvider.class, classLoader);
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:10,代码来源:TemplateAvailabilityProviders.java

示例7: initPropertyLoaders

import org.springframework.core.io.support.SpringFactoriesLoader; //导入方法依赖的package包/类
private List<PropertySourceLoader> initPropertyLoaders() {
    return SpringFactoriesLoader.loadFactories(PropertySourceLoader.class, getClass().getClassLoader());
}
 
开发者ID:ulisesbocchio,项目名称:jasypt-spring-boot,代码行数:4,代码来源:EncryptablePropertySourceBeanFactoryPostProcessor.java


注:本文中的org.springframework.core.io.support.SpringFactoriesLoader.loadFactories方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。