public class ResourceModuleRegistry extends AbstractModuleRegistry implements org.springframework.context.ResourceLoaderAware
Resource based implementation of ModuleRegistry that supports two kinds of modules:
source/time.xmlsource/time/config/time.xml and extra classpath is loaded from jars in a lib subdirectory
e.g. source/time/lib/*.jar| Constructor and Description |
|---|
ResourceModuleRegistry(java.lang.String root) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
inferModuleName(org.springframework.core.io.Resource resource)
Recover the name of the module, given its resource location.
|
protected org.springframework.core.io.Resource |
locateApplicationContext(java.lang.String name,
ModuleType type)
Return a resource pointing to an
ApplicationContext XML definition file. |
protected java.util.List<org.springframework.core.io.Resource> |
locateApplicationContexts(ModuleType type)
Return a list of resources pointing to
ApplicationContext XML definition files. |
protected java.net.URL[] |
maybeLocateClasspath(org.springframework.core.io.Resource resource,
java.lang.String name,
ModuleType type)
Return an array of jar files locations or
null if the module is a plain xml file. |
void |
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) |
findDefinition, findDefinitions, findDefinitions, findDefinitionsprotected org.springframework.core.io.Resource locateApplicationContext(java.lang.String name,
ModuleType type)
AbstractModuleRegistryApplicationContext XML definition file.locateApplicationContext in class AbstractModuleRegistryprotected java.net.URL[] maybeLocateClasspath(org.springframework.core.io.Resource resource,
java.lang.String name,
ModuleType type)
AbstractModuleRegistrynull if the module is a plain xml file. Default implementation
returns null system.maybeLocateClasspath in class AbstractModuleRegistrypublic void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
setResourceLoader in interface org.springframework.context.ResourceLoaderAwareprotected java.util.List<org.springframework.core.io.Resource> locateApplicationContexts(ModuleType type)
AbstractModuleRegistryApplicationContext XML definition files.locateApplicationContexts in class AbstractModuleRegistryprotected java.lang.String inferModuleName(org.springframework.core.io.Resource resource)
AbstractModuleRegistryinferModuleName in class AbstractModuleRegistry