|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value=TYPE) @Documented public @interface ImportResource
Indicates one or more resources containing bean definitions to import.
Like @Import
, this annotation provides functionality similar to the
<import/> element in Spring XML. It is typically used when
designing @Configuration
classes to be bootstrapped by
AnnotationConfigApplicationContext
, but where some XML functionality such as
namespaces is still necessary.
By default, arguments to the value()
attribute will be processed using
an XmlBeanDefinitionReader
, i.e. it is assumed that resources are Spring
<beans/> XML files. Optionally, the reader()
attribute may be
supplied, allowing the user to specify a different BeanDefinitionReader
implementation, such as
PropertiesBeanDefinitionReader
.
Configuration
,
Import
Required Element Summary | |
---|---|
String[] |
value
Resource paths to import. |
Optional Element Summary | |
---|---|
Class<? extends BeanDefinitionReader> |
reader
BeanDefinitionReader implementation to use when processing resources specified
by the value() attribute. |
Element Detail |
---|
public abstract String[] value
public abstract Class<? extends BeanDefinitionReader> reader
BeanDefinitionReader
implementation to use when processing resources specified
by the value()
attribute.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |