@TargetSE(valueSE=TYPESE) @RetentionSE(valueSE=RUNTIMESE) @DocumentedSE public @interface Import
@Configuration クラス)を示します。Spring XML の <import/> 要素と同等の機能を提供します。@Configuration クラス、ImportSelector および ImportBeanDefinitionRegistrar 実装、通常のコンポーネントクラス(4.2 以降、AnnotationConfigApplicationContext.register(java.lang.Class<?>...) に類似)をインポートできます。
インポートされた @Configuration クラスで宣言された @Bean 定義には、@Autowired インジェクションを使用してアクセスする必要があります。Bean 自体をオートワイヤーすることも、Bean を宣言する構成クラスインスタンスをオートワイヤーすることもできます。後者のアプローチでは、@Configuration クラスのメソッド間での IDE にわかりやすい明示的なナビゲーションが可能です。
クラスレベルで、またはメタアノテーションとして宣言できます。
XML またはその他の非 @Configuration Bean 定義リソースをインポートする必要がある場合は、代わりに @ImportResource アノテーションを使用してください。
Configuration, ImportSelector, ImportBeanDefinitionRegistrar, ImportResourcepublic abstract ClassSE<?>[] value