Annotation Interface ImportResource
Like @Import, this annotation provides functionality similar to
the <import/> element in Framework XML. It is typically used when designing
@Configuration classes to be bootstrapped by an
AnnotationConfigApplicationContext, but where some XML functionality such
as namespaces is still necessary.
By default, arguments to the value() attribute will be processed using a
XmlBeanDefinitionReader
will be used to parse Framework <beans/> XML files. Optionally, the reader()
attribute may be declared, allowing the user to choose a custom BeanDefinitionReader
implementation.
- 从以下版本开始:
- 4.0 2022/3/8 17:39
- 作者:
- Chris Beams, Juergen Hoeller, Sam Brannen, Harry Yang
- 另请参阅:
-
可选元素概要
可选元素修饰符和类型可选元素说明String[]Resource locations from which to import.Class<? extends BeanDefinitionReader>BeanDefinitionReaderimplementation to use when processing resources specified via thevalue()attribute.String[]Alias forlocations().
-
元素详细资料
-
value
Alias forlocations().- 另请参阅:
- 默认值:
- {}
-
locations
Resource locations from which to import.Supports resource-loading prefixes such as
classpath:,file:, etc.Consult the Javadoc for
reader()for details on how resources will be processed.- 默认值:
- {}
-
reader
Class<? extends BeanDefinitionReader> readerBeanDefinitionReaderimplementation to use when processing resources specified via thevalue()attribute.By default, the reader will be adapted to the resource path specified: resources will be processed with an
XmlBeanDefinitionReader.- 另请参阅:
- 默认值:
- cn.taketoday.beans.factory.support.BeanDefinitionReader.class
-