I want To write a standalone application with IOC,How do i use springs dependancy injection in there. Im using JIdea. There is spring 2.5 support but i want to use spring 3.0 here is the way i tried!
I experience in using Spring MVC we can inject dependancies there in a WebApplicationContext but how do i inject dependancies in a standalone application
I tried this
ApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"com\\ttg\\xmlfile.xml"});
but i cannot see that the dependancies are injected by the beans defined there (in the xml file) I put the above code in the main method and two bean definitions for two Objects,in one java class's constructor i used the other class's object - which was injected to this object - and called a mehtod on that which will print some thing but it didnt worked i thought that the above code creates all the dependencies and injects them but it doesnt seem like that
How do i properly use Springs IOC, dependancy injection in my stand alone app which does not contain a WebApplicationContext?
Please mention steps