When the class is instantiated by the JVM, Spring Framework’s
ClassPathXmlApplicationContext object is created in the class’s
constructor. This context class reads a configuration XML file and creates any objects
declared in that file—a
FileReader by the name of “reader” bean in this
case. The instantiation of the
the container that consists of the objects defined in that XML file.
When the fetchData is invoked, the same reader bean is fetched from the container and the
appropriate methods on the <...
How the dependency injection is working
Share this highlighthttp://www.safaribooksonline.com/a/just-spring/75844/