org.springframework.context.annotation

## 注释类型 ImportResource

-     @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 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 `GroovyBeanDefinitionReader` if 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.

  从以下版本开始:
    3.0
  作者:
    Chris Beams, Juergen Hoeller, Sam Brannen
  另请参阅:
    `Configuration`, `Import`

- - ### 可选元素概要

    可选元素
    限定符和类型 | 可选元素和说明
    --- | ---
    `String[]` | `locations` Resource locations from which to import.
    `Class<? extends org.springframework.beans.factory.support.BeanDefinitionReader>` | `reader` `BeanDefinitionReader` implementation to use when processing resources specified via the `value()` attribute.
    `String[]` | `value` Alias for `locations()`.

- - ### 元素详细资料

    - #### value

          @AliasFor(value="locations")
          public abstract String[] value

      Alias for `locations()`.
      另请参阅:
        `locations()`, `reader()`
      默认值:
        {}

  - - #### locations

          @AliasFor(value="value")
          public abstract String[] 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.

      从以下版本开始:
        4.2
      另请参阅:
        `value()`, `reader()`
      默认值:
        {}

  - - #### reader

          public abstract Class<? extends org.springframework.beans.factory.support.BeanDefinitionReader> reader

      `BeanDefinitionReader` implementation to use when processing resources specified via the `value()` attribute.

      By default, the reader will be adapted to the resource path specified: `".groovy"` files will be processed with a `GroovyBeanDefinitionReader`; whereas, all other resources will be processed with an `XmlBeanDefinitionReader`.

      另请参阅:
        `value()`
      默认值:
        org.springframework.beans.factory.support.BeanDefinitionReader.class