For more advanced needs, register with the underlying BeanFactory directly. @see #getDefaultListableBeanFactory
The given instance is supposed to be fully initialized; the registry will not perform any initialization callbacks (in particular, it won't call InitializingBean's afterPropertiesSet
method). The given instance will not receive any destruction callbacks (like DisposableBean's destroy
method) either.
When running within a full BeanFactory: Register a bean definition instead of an existing instance if your bean is supposed to receive initialization and/or destruction callbacks.
Typically invoked during registry configuration, but can also be used for runtime registration of singletons. As a consequence, a registry implementation should synchronize singleton access; it will have to do this anyway if it supports a BeanFactory's lazy initialization of singletons. @param beanName the name of the bean @param singletonObject the existing singleton object @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet @see org.springframework.beans.factory.DisposableBean#destroy @see org.springframework.beans.factory.support.BeanDefinitionRegistry#registerBeanDefinition
For more advanced needs, register with the underlying BeanFactory directly. @see #getDefaultListableBeanFactory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|