BeanFactory.
For example, beans can look up collaborating beans via the factory (Dependency Lookup). Note that most beans will choose to receive references to collaborating beans via corresponding bean properties or constructor arguments (Dependency Injection).
For a list of all bean lifecycle methods, see the
BeanFactory javadocs.
BeanNameAware, BeanClassLoaderAware, InitializingBean, org.springframework.context.ApplicationContextAware
| Modifier and Type | Method and Description |
|---|---|
| public void | setBeanFactory(BeanFactory
owning BeanFactory (never beanFactory)null).
The bean can immediately call methods on the factory.Callback that supplies the owning factory to a bean instance. |
| setBeanFactory | back to summary |
|---|---|
| public void setBeanFactory(BeanFactory beanFactory) throws BeansException Callback that supplies the owning factory to a bean instance. Invoked after the population of normal bean properties
but before an initialization callback such as
| |