org.springframework.context.annotation

## 接口 ImportSelector

- 所有已知子接口:
    DeferredImportSelector
  所有已知实现类:
    AdviceModeImportSelector, AsyncConfigurationSelector, CachingConfigurationSelector

      public interface ImportSelector

  Interface to be implemented by types that determine which @`Configuration` class(es) should be imported based on a given selection criteria, usually one or more annotation attributes.

  An `ImportSelector` may implement any of the following `Aware` interfaces, and their respective methods will be called prior to `selectImports(org.springframework.core.type.AnnotationMetadata)`:

  - `EnvironmentAware`
  - `BeanFactoryAware`
  - `BeanClassLoaderAware`
  - `ResourceLoaderAware`

  `ImportSelector` implementations are usually processed in the same way as regular `@Import` annotations, however, it is also possible to defer selection of imports until all `@Configuration` classes have been processed (see `DeferredImportSelector` for details).

  从以下版本开始:
    3.1
  作者:
    Chris Beams
  另请参阅:
    `DeferredImportSelector`, `Import`, `ImportBeanDefinitionRegistrar`, `Configuration`

- - ### 方法概要

    所有方法 实例方法 抽象方法
    限定符和类型 | 方法和说明
    --- | ---
    `String[]` | `selectImports(org.springframework.core.type.AnnotationMetadata importingClassMetadata)` Select and return the names of which class(es) should be imported based on the `AnnotationMetadata` of the importing @`Configuration` class.

- - ### 方法详细资料

    - #### selectImports

          String[] selectImports(org.springframework.core.type.AnnotationMetadata importingClassMetadata)

      Select and return the names of which class(es) should be imported based on the `AnnotationMetadata` of the importing @`Configuration` class.