クラス CustomAutowireConfigurer
java.lang.ObjectSE
org.springframework.beans.factory.annotation.CustomAutowireConfigurer
- 実装されているすべてのインターフェース:
Aware, BeanClassLoaderAware, BeanFactoryPostProcessor, Ordered
public class CustomAutowireConfigurer
extends ObjectSE
implements BeanFactoryPostProcessor, BeanClassLoaderAware, Ordered
カスタム autowire 修飾子型の便利な登録を可能にする
BeanFactoryPostProcessor 実装。
<bean id="customAutowireConfigurer" class="org.springframework.beans.factory.annotation.CustomAutowireConfigurer">
<property name="customQualifierTypes">
<set>
<value>mypackage.MyQualifier</value>
</set>
</property>
</bean>- 導入:
- 2.5
- 作成者:
- Mark Fisher, Juergen Hoeller
- 関連事項:
フィールドのサマリー
インターフェース Ordered から継承されたフィールド
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCEコンストラクターの概要
コンストラクター方法の概要
修飾子と型メソッド説明intgetOrder()このオブジェクトの順序値を取得します。voidpostProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) 標準の初期化後に、アプリケーションコンテキストの内部 Bean ファクトリを変更します。voidsetBeanClassLoader(@Nullable ClassLoaderSE beanClassLoader) Beanclass loaderSE を Bean インスタンスに提供するコールバック。voidsetCustomQualifierTypes(SetSE<?> customQualifierTypes) Bean のオートワイヤー時に考慮されるカスタム修飾子アノテーション型を登録します。voidsetOrder(int order)
コンストラクターの詳細
CustomAutowireConfigurer
public CustomAutowireConfigurer()
メソッドの詳細
setOrder
public void setOrder(int order) getOrder
setBeanClassLoader
インターフェースからコピーされた説明:BeanClassLoaderAwareBeanclass loaderSE を Bean インスタンスに提供するコールバック。通常の Bean プロパティの設定後、ただし
InitializingBean'sInitializingBean.afterPropertiesSet()メソッドやカスタム init-method などの初期化コールバックの前に呼び出されます。- 次で指定:
- インターフェース
BeanClassLoaderAwareのsetBeanClassLoader - パラメーター:
beanClassLoader- 所有クラスローダー
setCustomQualifierTypes
postProcessBeanFactory
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException インターフェースからコピーされた説明:BeanFactoryPostProcessor標準の初期化後に、アプリケーションコンテキストの内部 Bean ファクトリを変更します。すべての Bean 定義はロードされますが、Bean はまだインスタンス化されていません。これにより、先行初期化する Bean に対してもプロパティをオーバーライドまたは追加できます。- 次で指定:
- インターフェース
BeanFactoryPostProcessorのpostProcessBeanFactory - パラメーター:
beanFactory- アプリケーションコンテキストで使用される Bean ファクトリ- 例外:
BeansException- エラーの場合