ConfigurableBeanFactory, it provides facilities to
analyze and modify bean definitions, and to pre-instantiate singletons.
This subinterface of
is not meant to be used in normal application code: Stick to
org.springframework.beans.factory.BeanFactory or
org.springframework.beans.factory.BeanFactory for typical
use cases. This interface is just meant to allow for framework-internal
plug'n'play even when needing access to bean factory configuration methods.
org.springframework.beans.factory.ListableBeanFactory
org.springframework.context.support.AbstractApplicationContext#getBeanFactory()This will typically be used by application contexts to register dependencies that are resolved in other ways, like BeanFactory through BeanFactoryAware or ApplicationContext through ApplicationContextAware.
By default, only the BeanFactoryAware interface is ignored. For further types to ignore, invoke this method for each type.
ifc the dependency interface to ignoreorg.springframework.beans.factory.BeanFactoryAwareorg.springframework.context.ApplicationContextAwareThis is intended for factory/context references that are supposed to be autowirable but are not defined as beans in the factory: e.g. a dependency of type ApplicationContext resolved to the ApplicationContext instance that the bean is living in.
Note: There are no such default types registered in a plain BeanFactory, not even for the BeanFactory interface itself.
dependencyType the dependency type to register. This will typically
be a base interface such as BeanFactory, with extensions of it resolved
as well if declared as an autowiring dependency (e.g. ListableBeanFactory),
as long as the given value actually implements the extended interface.autowiredValue the corresponding autowired value. This may also be an
implementation of the org.springframework.beans.factory.ObjectFactory
interface, which allows for lazy resolution of the actual target value.This method checks ancestor factories as well.
beanName the name of the bean to checkdescriptor the descriptor of the dependency to resolveorg.springframework.beans.factory.NoSuchBeanDefinitionException if there is no bean with the given nameA returned BeanDefinition object should not be a copy but the original definition object as registered in the factory. This means that it should be castable to a more specific implementation type, if necessary.
NOTE: This method does not consider ancestor factories. It is only meant for accessing local bean definitions of this factory.
beanName the name of the beanorg.springframework.beans.factory.NoSuchBeanDefinitionException if there is no bean with the given name
defined in this factoryFactoryBeans.
Typically invoked at the end of factory setup, if desired.
org.springframework.beans.BeansException if one of the singleton beans could not be created.
Note: This may have left the factory with some beans already initialized!
Call ConfigurableBeanFactory.destroySingletons() for full cleanup in this case.ConfigurableBeanFactory.destroySingletons()