@Retention(value=RUNTIME) @Target(value=TYPE) @Documented public @interface ImportResource
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| Modifier and Type | Required Element and Description |
|---|---|
String[] |
value
Resource paths to import.
|
| Modifier and Type | Optional Element and Description |
|---|---|
Class<? extends BeanDefinitionReader> |
reader
BeanDefinitionReader implementation to use when processing resources specified
by the value() attribute. |
public abstract String[] value
classpath: and
file:, etc may be used.public abstract Class<? extends BeanDefinitionReader> reader
BeanDefinitionReader implementation to use when processing resources specified
by the value() attribute.