This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Spring do provide IOC through Dependency Injection either with Setter Injection or Constructor Injection, with a aim to avoid TightCoupling and enforce LooseCoupling. In tight coupling, one object is heavily dependent on other object like as below.
Lets try attempt to reduce the impact of tight coupled Travel & Car object
Now Spring did it through XML bean configurations .... as below
spring.xml Configuration :
I can define any vehcile in the xml , ie a Train/Aeroplane/Cruise/Horse/Camel............