# Package org.springframework.beans.factory

@NonNullApi @NonNullFields package org.springframework.beans.factory
The core package implementing Spring's lightweight Inversion of Control (IoC) container.

Provides an alternative to the Singleton and Prototype design patterns, including a consistent approach to configuration management. Builds on the org.springframework.beans package.

This package and related packages are discussed in Chapter 11 of Expert One-On-One J2EE Design and Development by Rod Johnson (Wrox, 2002).

Related Packages
Package
Description
org.springframework.beans
This package contains interfaces and classes for manipulating Java beans.
org.springframework.beans.factory.annotation
Support package for annotation-driven bean configuration.
org.springframework.beans.factory.aot
AOT support for bean factories.
org.springframework.beans.factory.config
SPI interfaces and configuration-related convenience classes for bean factories.
org.springframework.beans.factory.groovy
Support package for Groovy-based bean definitions.
org.springframework.beans.factory.parsing
Support infrastructure for bean definition parsing.
org.springframework.beans.factory.serviceloader
Support package for the Java `ServiceLoader` facility.
org.springframework.beans.factory.support
Classes supporting the `org.springframework.beans.factory` package.
org.springframework.beans.factory.wiring
Mechanism to determine bean wiring metadata from a bean instance.
org.springframework.beans.factory.xml
Contains an abstract XML-based `BeanFactory` implementation, including a standard "spring-beans" XSD.
Class
Description
Aware
A marker superinterface indicating that a bean is eligible to be notified by the Spring container of a particular framework object through a callback-style method.
BeanClassLoaderAware
Callback that allows a bean to be aware of the bean `class loader`; that is, the class loader used by the present bean factory to load bean classes.
BeanCreationException
Exception thrown when a BeanFactory encounters an error when attempting to create a bean from a bean definition.
BeanCreationNotAllowedException
Exception thrown in case of a bean being requested despite bean creation currently not being allowed (for example, during the shutdown phase of a bean factory).
BeanCurrentlyInCreationException
Exception thrown in case of a reference to a bean that's currently in creation.
BeanDefinitionStoreException
Exception thrown when a BeanFactory encounters an invalid bean definition: for example, in case of incomplete or contradictory bean metadata.
BeanExpressionException
Exception that indicates an expression evaluation attempt having failed.
BeanFactory
The root interface for accessing a Spring bean container.
BeanFactoryAware
Interface to be implemented by beans that wish to be aware of their owning `BeanFactory`.
BeanFactoryInitializer<F extends ListableBeanFactory>
Callback interface for initializing a Spring `ListableBeanFactory` prior to entering the singleton pre-instantiation phase.
BeanFactoryUtils
Convenience methods operating on bean factories, in particular on the `ListableBeanFactory` interface.
BeanInitializationException
Exception that a bean implementation is suggested to throw if its own factory-aware initialization code fails.
BeanIsAbstractException
Exception thrown when a bean instance has been requested for a bean definition which has been marked as abstract.
BeanIsNotAFactoryException
Exception thrown when a bean is not a factory, but a user tries to get at the factory for the given bean name.
BeanNameAware
Interface to be implemented by beans that want to be aware of their bean name in a bean factory.
BeanNotOfRequiredTypeException
Thrown when a bean doesn't match the expected type.
CannotLoadBeanClassException
Exception thrown when the BeanFactory cannot load the specified class of a given bean.
DisposableBean
Interface to be implemented by beans that want to release resources on destruction.
FactoryBean<T>
Interface to be implemented by objects used within a `BeanFactory` which are themselves factories for individual objects.
FactoryBeanNotInitializedException
Exception to be thrown from a FactoryBean's `getObject()` method if the bean is not fully initialized yet, for example because it is involved in a circular reference.
HierarchicalBeanFactory
Sub-interface implemented by bean factories that can be part of a hierarchy.
InitializingBean
Interface to be implemented by beans that need to react once all their properties have been set by a `BeanFactory`: for example, to perform custom initialization, or merely to check that all mandatory properties have been set.
InjectionPoint
A simple descriptor for an injection point, pointing to a method/constructor parameter or a field.
ListableBeanFactory
Extension of the `BeanFactory` interface to be implemented by bean factories that can enumerate all their bean instances, rather than attempting bean lookup by name one by one as requested by clients.
NamedBean
Counterpart of `BeanNameAware`.
NoSuchBeanDefinitionException
Exception thrown when a `BeanFactory` is asked for a bean instance for which it cannot find a definition.
NoUniqueBeanDefinitionException
Exception thrown when a `BeanFactory` is asked for a bean instance for which multiple matching candidates have been found when only one matching bean was expected.
ObjectFactory<T>
Defines a factory which can return an Object instance (possibly shared or independent) when invoked.
ObjectProvider<T>
A variant of `ObjectFactory` designed specifically for injection points, allowing for programmatic optionality and lenient not-unique handling.
SmartFactoryBean<T>
Extension of the `FactoryBean` interface.
SmartInitializingSingleton
Callback interface triggered at the end of the singleton pre-instantiation phase during `BeanFactory` bootstrap.
UnsatisfiedDependencyException
Exception thrown when a bean depends on other beans or simple properties that were not specified in the bean factory definition, although dependency checking was enabled.