- Spring container creates the objects(beans defined by spring).
- Wire theirs dependencies like if an object A has a member of Object B type then spring wire the Object B dependencies to Object A.
- Manage their complete lifecycle from cradle to grave (or new to finalize() as the case may be).
- The container is at the core of the Spring Framework.
- Spring’s container uses dependency injection (DI) to manage the components(beans)
- org.springframework.beans.factory.BeanFactory Bean factories defined by the org.springframework.beans.factory.BeanFactory interface are the simplest of containers, providing basic support for DI.
org.springframework.context.ApplicationContext is a sub interface of org.springframework.beans.factory.BeanFactory
org.springframework.context.ApplicationContext interface provides application framework services like:-
- Application contexts provides functionality for resolving text messages, including support for internationalization (I18N).
- Application contexts provide a generic way to load file resources.
- Application contexts can publish events to beans that are registered as listeners.