The FileSystemXmlApplicationContext container loads the definition of the beans from the Configuration XML file. The full path of the XML bean configuration file must be provided to the constructor.
The ClassPathXmlApplicationContext container also loads the definition of the beans from an XML file. Here, you need to set CLASSPATH properly because this container will look bean configuration XML file in CLASSPATH.
The WebXmlApplicationContext container loads the XML file with definitions of all beans from within a web application.
AnnotationConfig ApplicationContext, a standalone application context, accepts annotated classes such as @Configuration-annotated classes also @Component types and JSR-330 compliant classes using javax.inject annotations.