Resource objects.
This is an extension to the org.
interface. A passed-in ResourceLoader (for example, an
org. passed in via
org. when running in a context)
can be checked whether it implements this extended interface too.
PathMatchingResourcePatternResolver is a standalone implementation
that is usable outside an ApplicationContext, also used by
ResourceArrayPropertyEditor for populating Resource array bean
properties.
Can be used with any sort of location pattern — for example,
"/WEB-INF/*-context.xml". However, input patterns have to match the
strategy implementation. This interface just specifies the conversion method
rather than a specific pattern format.
This interface also defines a classpath*: resource
prefix for all matching resources from the module path and the class path. Note
that the resource location may also contain placeholders — for example
"/beans-*.xml". JAR files or different directories in the module path
or class path can contain multiple files of the same name.
org.springframework.core.io.Resource , org.springframework.core.io.ResourceLoader , org.springframework.context.ApplicationContext , org.springframework.context.ResourceLoaderAware
| Modifier and Type | Field and Description |
|---|---|
| public static final String | CLASSPATH_ALL_URL_PREFIX
Pseudo URL prefix for all matching resources from the class path: |
| Modifier and Type | Method and Description |
|---|---|
| public Resource[] | Returns: the correspondingResource objectsthe location pattern to resolve locationPattern)Resolve the given location pattern into |
| CLASSPATH_ALL_URL_PREFIX | back to summary |
|---|---|
| public static final String CLASSPATH_ALL_URL_PREFIX Pseudo URL prefix for all matching resources from the class path: This differs from ResourceLoader's As of Spring Framework 6.0, the semantics for the | |
| getResources | back to summary |
|---|---|
| public Resource[] getResources(String locationPattern) throws IOException Resolve the given location pattern into Overlapping resource entries that point to the same physical resource should be avoided, as far as possible. The result should have set semantics.
| |