public class ConfigurationResourceLoader
extends org.springframework.core.io.DefaultResourceLoader
Resources
bean is not available,
e.g. before the AppContext
is fully initialized.Modifier and Type | Field and Description |
---|---|
protected java.io.File |
confDir |
Constructor and Description |
---|
ConfigurationResourceLoader()
Constructor for standalone use.
|
ConfigurationResourceLoader(java.lang.ClassLoader classLoader) |
ConfigurationResourceLoader(java.lang.ClassLoader classLoader,
java.io.File confDir) |
Modifier and Type | Method and Description |
---|---|
java.io.File |
getDefaultConfDir() |
org.springframework.core.io.Resource |
getResource(java.lang.String location)
Search for a resource according to the following rules:
If the location represents an URL, return a new
UrlResource for
this URL.
Try to find a file below the conf directory using location as relative path. |
void |
setConfDir(java.io.File confDir) |
public ConfigurationResourceLoader()
public ConfigurationResourceLoader(java.lang.ClassLoader classLoader)
public ConfigurationResourceLoader(java.lang.ClassLoader classLoader, java.io.File confDir)
public java.io.File getDefaultConfDir()
public void setConfDir(java.io.File confDir)
public org.springframework.core.io.Resource getResource(java.lang.String location)
UrlResource
for
this URL.conf
directory using location
as relative path.
If found, return a new UrlResource
for this file.ClassPathResource
to retrieve content
from classpath.getResource
in interface org.springframework.core.io.ResourceLoader
getResource
in class org.springframework.core.io.DefaultResourceLoader
location
- resource location