Annotation Interface ImportResource
Like @Import, this annotation provides functionality similar to
 the <import/> element in Spring XML configuration. 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 locations or value
 attribute will be processed using a
 GroovyBeanDefinitionReader
 for resource locations ending in ".groovy"; otherwise, an
 XmlBeanDefinitionReader
 will be used to parse Spring <beans/> XML files. Optionally, the reader()
 attribute may be declared, allowing the user to choose a custom BeanDefinitionReader
 implementation.
- Since:
- 3.0
- Author:
- Chris Beams, Juergen Hoeller, Sam Brannen
- See Also:
- 
Optional Element SummaryOptional ElementsModifier and TypeOptional ElementDescriptionString[]Resource locations from which to import.Class<? extends BeanDefinitionReader>BeanDefinitionReaderimplementation to use when processing resources specified via thelocationsorvalueattribute.String[]Alias forlocations().
- 
Element Details- 
valueAlias forlocations().- See Also:
 - Default:
- {}
 
- 
locationsResource 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.- Default:
- {}
 
- 
readerClass<? extends BeanDefinitionReader> readerBeanDefinitionReaderimplementation to use when processing resources specified via thelocationsorvalueattribute.The configured BeanDefinitionReadertype must declare a constructor that accepts a singleBeanDefinitionRegistryargument.By default, the reader will be adapted to the resource path specified: ".groovy"files will be processed with aGroovyBeanDefinitionReader; whereas, all other resources will be processed with anXmlBeanDefinitionReader.- See Also:
 - Default:
- org.springframework.beans.factory.support.BeanDefinitionReader.class
 
 
-