@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
public abstract String[] value
classpath:
and
file:
, etc may be used.