A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
When to use different ways to load config files in spring???
Joined: Mar 15, 2013
Mar 15, 2013 03:00:13
I am new to Spring. I have query regarding the ways to load the config file in spring.
What is the difference between
ApplicationContext context = new ClassPathXmlApplicationContext("AppConfig.xml");
Resource res = new ClassPathResource("spconfig.xml");
BeanFactory factory = new XmlBeanFactory(res);
Joined: Mar 07, 2010
Mar 15, 2013 16:18:49
BeanFactory should rarely if ever be used in application code with modern versions of Spring. If you are loading a context XML in a standalone Spring application then you should use the first approach.
How To Ask Questions
Read before you PM me
subject: When to use different ways to load config files in spring???
Help? - Reloading log4j.xml config without jboss restart
what is diff in Spring's ClassPathResource and FileSystemResource class
Loading the Bean in two different ways
ClassPathXmlApplicationContext wildcard problem
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013