Hello, I'm relatively new to the DI subject, I have read that you can inject directly objects and values through configuring a xml file, and this injection takes place during initialization, but what happens with the direct injection on the fly? how spring handles that?.. is it possible?.. thanks.
You can use XML, or Java code or any of a number of different mechanisms to configure the injector. Once configured, the injector takes care of calling "new" for you and providing your objects with dependencies.