|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Simple interface for bean definition readers. Specifies load methods with Resource parameters.
Concrete bean definition readers can of course add additional load and register methods for bean definitions, specific to their bean definition format.
Note that a bean definition reader does not have to implement this interface. It only serves as suggestion for bean definition readers that want to follow standard naming conventions.
Resource
Method Summary | |
ClassLoader |
getBeanClassLoader()
Return the class loader to use for bean classes. |
BeanDefinitionRegistry |
getBeanFactory()
Return the bean factory to register the bean definitions with. |
ResourceLoader |
getResourceLoader()
Return the resource loader to use for resource locations. |
int |
loadBeanDefinitions(Resource resource)
Load bean definitions from the specified resource. |
int |
loadBeanDefinitions(Resource[] resources)
Load bean definitions from the specified resources. |
Method Detail |
public BeanDefinitionRegistry getBeanFactory()
public ClassLoader getBeanClassLoader()
Null suggests to not load bean classes but just register bean definitions with class names, for example when just registering beans in a registry but not actually instantiating them in a factory.
public ResourceLoader getResourceLoader()
Null suggests that absolute resource loading is not available for this bean definition reader.
This is mainly meant to be used for importing further resources from within a bean definition resource, for example via the "import" tag in XML bean definitions. It is recommended, however, to apply such imports relative to the defining resource; only explicit full resource locations will trigger absolute resource loading.
ResourcePatternResolver
public int loadBeanDefinitions(Resource resource) throws BeansException
resource
- the resource descriptor
BeansException
- in case of loading or parsing errorspublic int loadBeanDefinitions(Resource[] resources) throws BeansException
resources
- the resource descriptors
BeansException
- in case of loading or parsing errors
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |