ClassPathXmlApplicationContext—Loads a context definition from an XMLfile located in the classpath。
--ApplicationContextcontext=new ClassPathXmlApplicationContext("foo.xml");
FileSystemXmlApplicationContext—Loads a context definition from an XML file in the file system.
--ApplicationContextcontext=new FileSystemXmlApplicationContext("c:/foo.xml");
XmlWebApplicationContext—Loads context definitions from an XML file contained within a web application.