Example usage for org.springframework.core.io.support SpringFactoriesLoader FACTORIES_RESOURCE_LOCATION

List of usage examples for org.springframework.core.io.support SpringFactoriesLoader FACTORIES_RESOURCE_LOCATION

Introduction

In this page you can find the example usage for org.springframework.core.io.support SpringFactoriesLoader FACTORIES_RESOURCE_LOCATION.

Prototype

String FACTORIES_RESOURCE_LOCATION

To view the source code for org.springframework.core.io.support SpringFactoriesLoader FACTORIES_RESOURCE_LOCATION.

Click Source Link

Document

The location to look for factories.

Usage

From source file:org.springframework.test.context.support.AbstractTestContextBootstrapper.java

/**
 * Get the names of the default {@link TestExecutionListener} classes for
 * this bootstrapper.//from w  w  w  .jav  a2  s .  c  om
 * <p>The default implementation looks up all
 * {@code org.springframework.test.context.TestExecutionListener} entries
 * configured in all {@code META-INF/spring.factories} files on the classpath.
 * <p>This method is invoked by {@link #getDefaultTestExecutionListenerClasses()}.
 * @return an <em>unmodifiable</em> list of names of default {@code TestExecutionListener}
 * classes
 * @see SpringFactoriesLoader#loadFactoryNames
 */
protected List<String> getDefaultTestExecutionListenerClassNames() {
    List<String> classNames = SpringFactoriesLoader.loadFactoryNames(TestExecutionListener.class,
            getClass().getClassLoader());
    if (logger.isInfoEnabled()) {
        logger.info(String.format("Loaded default TestExecutionListener class names from location [%s]: %s",
                SpringFactoriesLoader.FACTORIES_RESOURCE_LOCATION, classNames));
    }
    return Collections.unmodifiableList(classNames);
}