What are the common implementations of the Application Context ?

The three commonly used implementation of Application Context as below

 

ClassPathXmlApplicationContext : It Loads context definition from an XML file located in the classpath, treating context definitions as classpath resources. The application context is loaded from the application's classpath by using the code.

ApplicationContext context = new ClassPathXmlApplicationContext("bean.xml");

 

FileSystemXmlApplicationContext : It loads context definition from an XML file in the filesystem. The application context is loaded from the file system by using the code .

ApplicationContext context = new FileSystemXmlApplicationContext("bean.xml");

 

XmlWebApplicationContext : It loads context definition from an XML file contained within a web application.

 

spring 12

FOLLOW US ON LinkedIn



Explore Tutu'rself