public class SpringBeanFactory extends Object implements BeanFactory<Class<?>,Object>, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
利用するには、このクラスをSpringのコンテナに登録しておく必要があります。
Springのコンテナに登録されていないクラスは、通常のクラスとしてインスタンスを作成します。
ただし、コンテナ管理外のクラスに対しても、アノテーションAutowiredによるインジェクションが可能です。
| コンストラクタと説明 |
|---|
SpringBeanFactory() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
afterPropertiesSet() |
Object |
create(Class<?> clazz)
引数Tのクラスタイプのインスタンスを返す。
|
org.springframework.context.ApplicationContext |
getApplicationContext() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public Object create(Class<?> clazz)
BeanFactorycreate インタフェース内 BeanFactory<Class<?>,Object>clazz - クラスタイプ。public void afterPropertiesSet()
throws Exception
afterPropertiesSet インタフェース内 org.springframework.beans.factory.InitializingBeanExceptionpublic org.springframework.context.ApplicationContext getApplicationContext()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext インタフェース内 org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionCopyright © 2025 mygreen. All rights reserved.