Class CompositeResourceLoader

  • All Implemented Interfaces:
    org.springframework.core.io.ResourceLoader

    public class CompositeResourceLoader
    extends Object
    implements org.springframework.core.io.ResourceLoader
    Implementation of spring ResourceLoader that will use internally a set of resource loaders. When a resource is requested, each resources loaders will be queried until one find an existing resources. If no one find an existing resource, the last computed resource is returned.
    • Constructor Detail

      • CompositeResourceLoader

        public CompositeResourceLoader​(Collection<org.springframework.core.io.ResourceLoader> resourceLoaders)
        Create new composite resource loader.
        Parameters:
        resourceLoaders - Collection of resource loaders.
    • Method Detail

      • getResource

        public org.springframework.core.io.Resource getResource​(String location)
        Specified by:
        getResource in interface org.springframework.core.io.ResourceLoader
      • getClassLoader

        public ClassLoader getClassLoader()
        Specified by:
        getClassLoader in interface org.springframework.core.io.ResourceLoader