Just have started reading Spring in Ation- Second Edition. So far have liked the book, DI
pattern and Spring in general.
Many examples in the first few chapters describe how to let spring create and get objects (using getBean) for you instead of you having to do 'new'
These examples use predefined values stored in XML file.
But, most of the times objects are needed to use init values which are not known when .XML file is created.
for e.g. batch job that reads from flat file or
Servlet program that reads from parameters or interactive
program that reads data from screen.
In these cases, are we first supposed to let Spring create object for us using values defined in .Xml file and then
manually call the set(Property) methods ? or there is any other way you can feed these values stored in local
variables, during object creation ?