Question : what is Bean Factory, have you used XMLBeanFactory?Reponse : 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); |
Enregistrer pour revision
Ajoutez cet element aux favoris, marquez-le comme difficile ou placez-le dans un ensemble de revision.
Connectez-vous pour enregistrer des favoris, des questions difficiles et des ensembles de revision.
Est-ce utile ? Oui Non
Les plus utiles selon les utilisateurs :
- What is Spring?
- What are the advantages of Spring framework?
- What are features of Spring?
- What are the types of Dependency Injection Spring supports?
- Please describe the basic modules of Spring Framework.