public class DelegatingResourceLoader extends Object implements org.springframework.core.io.ResourceLoader, org.springframework.context.ResourceLoaderAware
ResourceLoader
implementation that delegates to other ResourceLoader
instances
that are stored in a Map with their associated URI schemes as the keys.
This implementation is also caching remote resources which are not directly accessible
as File
into either a given cache directory or on default a temporary location
prefixed by "deployer-resource-cache".Constructor and Description |
---|
DelegatingResourceLoader(Map<String,org.springframework.core.io.ResourceLoader> loaders)
Instantiates a new delegating resource loader.
|
DelegatingResourceLoader(Map<String,org.springframework.core.io.ResourceLoader> loaders,
File cacheDirectory)
Instantiates a new delegating resource loader.
|
Modifier and Type | Method and Description |
---|---|
ClassLoader |
getClassLoader() |
org.springframework.core.io.Resource |
getResource(String location) |
void |
setResourceLoader(org.springframework.core.io.ResourceLoader contextResourceLoader) |
public DelegatingResourceLoader(Map<String,org.springframework.core.io.ResourceLoader> loaders)
loaders
- the loaderspublic void setResourceLoader(org.springframework.core.io.ResourceLoader contextResourceLoader)
setResourceLoader
in interface org.springframework.context.ResourceLoaderAware
public org.springframework.core.io.Resource getResource(String location)
getResource
in interface org.springframework.core.io.ResourceLoader
public ClassLoader getClassLoader()
getClassLoader
in interface org.springframework.core.io.ResourceLoader
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.