posted 13 years ago
Hi all,
I have a configuration file as follows:-
In the given application,I am no where using the following line :
ApplicationContext context=new ClassPathXmlApplicationContext(resource);
but still have my application working just fine.
On searching i found that
1:It is the ContextLoaderListener who is actually loading the xml files in classpath,and
2: the beans inside the xml file are automatically generated by the container.
The doubt i have is,that,does the container creates the beans simply by loading the xml files?just like that!!or do we have to initialise the ApplicationContext by using the Resource class as parameter to the constructor as follows:
ApplicationContext context=new ClassPathXmlApplicationContext(resource);
I am a bit confused on these concepts.Please guide me through.
Thanks...
Thanks,
Sudhanshu(OCPJP,OCEJPAD)