org.springframework.context.ApplicationContext
is required to provide this functionality plus extended
org.springframework.core.io.support.ResourcePatternResolver support.
DefaultResourceLoader is a standalone implementation that is
usable outside an ApplicationContext and is also used by ResourceEditor.
Bean properties of type Resource and Resource[] can be populated
from Strings when running in an ApplicationContext, using the particular
context's resource loading strategy.
Resource, org.springframework.core.io.support.ResourcePatternResolver , org.springframework.context.ApplicationContext , org.springframework.context.ResourceLoaderAware
| Modifier and Type | Field and Description |
|---|---|
| public static final String | CLASSPATH_URL_PREFIX
Pseudo URL prefix for loading from the class path: "classpath:". |
| Modifier and Type | Method and Description |
|---|---|
| public ClassLoader | Returns: theClassLoader
(only null if even the system ClassLoader isn't accessible)Expose the |
| public Resource | Returns: a correspondingResource handle (never null)the resource location location)Return a |
| CLASSPATH_URL_PREFIX | back to summary |
|---|---|
| public static final String CLASSPATH_URL_PREFIX Pseudo URL prefix for loading from the class path: "classpath:". | |
| getClassLoader | back to summary |
|---|---|
| public ClassLoader getClassLoader() Expose the Clients which need to access the
| |
| getResource | back to summary |
|---|---|
| public Resource getResource(String location) Return a The handle should always be a reusable resource descriptor,
allowing for multiple
Note that a
| |