In Spring framework, the IOC container is represented by the interface ApplicationContext which holds all objects in a project, later we can ask ApplicationContext for any bean/object by using a method called “ getBean() ” we will see this later in details.
The Spring container is responsible for instantiating, configuring and assembling objects known as beans, as well as managing their lifecycle.
The Spring framework provides several implementations of the ApplicationContext interface
ClassPathXmlApplicationContext
This container loads the definitions of the beans from an XML file. Here you do not need to provide the full path of the XML file but you need to set CLASSPATH properly because this container will look like bean configuration XML file in CLASSPATH.
FileSystemXmlApplicationContext for standalone applications
This container loads the definitions of the beans from an XML file. Here you need to provide the full path of the XML bean configuration file to the constructor.
WebApplicationContext for web applications.
This container loads the XML file with definitions of all beans from within a web application.
In order to assemble beans, the container uses configuration metadata, which can be in the form of XML configuration or annotations.