Class SpringFactoriesLoader


  • public final class SpringFactoriesLoader
    extends Object
    General purpose factory loading mechanism for internal use within the framework.

    SpringFactoriesLoaderloads and instantiates factories of a given type from "META-INF/spring.factories" files which may be present in multiple JAR files in the classpath. The spring.factories file must be in Properties format, where the key is the fully qualified name of the interface or abstract class, and the value is a comma-separated list of implementation class names. For example:

    example.MyService=example.MyServiceImpl1,example.MyServiceImpl2
    where example.MyService is the name of the interface, and MyServiceImpl1 and MyServiceImpl2 are two implementations.
    Since:
    3.2
    Author:
    Arjen Poutsma, Juergen Hoeller, Sam Brannen