Package de.juplo.httpresources
Class HttpResourceChainAwareResourceLoader
- java.lang.Object
-
- de.juplo.httpresources.HttpResourceChainAwareResourceLoader
-
- All Implemented Interfaces:
org.springframework.core.io.ResourceLoader
public class HttpResourceChainAwareResourceLoader extends Object implements org.springframework.core.io.ResourceLoader
-
-
Constructor Summary
Constructors Constructor Description HttpResourceChainAwareResourceLoader(org.springframework.core.io.ResourceLoader loader, String... sources)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassLoader
getClassLoader()
org.springframework.core.io.Resource
getResource(String location)
Returns the first existing resource, or the first, if non of the resources exists.
-
-
-
Constructor Detail
-
HttpResourceChainAwareResourceLoader
public HttpResourceChainAwareResourceLoader(org.springframework.core.io.ResourceLoader loader, String... sources)
-
-
Method Detail
-
getResource
public org.springframework.core.io.Resource getResource(String location)
Returns the first existing resource, or the first, if non of the resources exists. This mimics the behavior of the original resolver as closeley as possible, asuming, that the first source is a / the local one.- Specified by:
getResource
in interfaceorg.springframework.core.io.ResourceLoader
- Parameters:
location
- The name of the requested resource- Returns:
- The first existing resource, or the first resource - never
null
.
-
getClassLoader
public ClassLoader getClassLoader()
- Specified by:
getClassLoader
in interfaceorg.springframework.core.io.ResourceLoader
-
-