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. If a scheme does not
exist within the Map, it will fallback to a DefaultResourceLoader
.
The Map may be empty (or null).Constructor and Description |
---|
DelegatingResourceLoader()
Instantiates a new delegating resource loader.
|
DelegatingResourceLoader(Map<String,org.springframework.core.io.ResourceLoader> loaders)
Instantiates a new delegating resource loader.
|
Modifier and Type | Method and Description |
---|---|
ClassLoader |
getClassLoader() |
Map<String,org.springframework.core.io.ResourceLoader> |
getLoaders()
Gets a map of configured loaders.
|
org.springframework.core.io.Resource |
getResource(String location) |
void |
setResourceLoader(org.springframework.core.io.ResourceLoader contextResourceLoader) |
public DelegatingResourceLoader()
public 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 © 2019 Pivotal Software, Inc.. All rights reserved.