Class CompositeResourceLoader
- java.lang.Object
-
- com.github.mjeanroy.springmvc.view.mustache.core.CompositeResourceLoader
-
- All Implemented Interfaces:
org.springframework.core.io.ResourceLoader
public class CompositeResourceLoader extends Object implements org.springframework.core.io.ResourceLoader
Implementation of springResourceLoader
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 Summary
Constructors Constructor Description CompositeResourceLoader(Collection<org.springframework.core.io.ResourceLoader> resourceLoaders)
Create new composite resource loader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassLoader
getClassLoader()
org.springframework.core.io.Resource
getResource(String location)
String
toString()
-
-
-
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 interfaceorg.springframework.core.io.ResourceLoader
-
getClassLoader
public ClassLoader getClassLoader()
- Specified by:
getClassLoader
in interfaceorg.springframework.core.io.ResourceLoader
-
-