Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: what is Bean Factory, have you used XMLBeanFactory?
Answer: BeanFactory is factory Pattern which is based on IOC design principles. It is used to make a clear separation between application configuration and dependency from actual code.
XmlBeanFactory is one of the implementation of bean Factory which we have used in our project.
org.springframework.beans.factory.xml.XmlBeanFactory is used to create bean instance defined in our xml file.
BeanFactory factory = new XmlBeanFactory(new FileInputStream("beans.xml"));
Or
ClassPathResource resorce = new ClassPathResource("beans.xml");
XmlBeanFactory factory = new XmlBeanFactory(resorce);
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook