Software Development

How to use Spring XmlBeanFactory



XmlBeanFactory is one of Spring’s containers that provide dependency injection. Note that it has been deprecated already. This means that you should not use this in new development projects.

Software Environment

  • Windows 7 Professional SP1
  • Eclipse – Kepler Release
  • Java 1.7 (1.7.0_67 – Windows x86)
  • Spring Framework
    • Spring Context 4.1.2

Maven Dependencies

Bean Configuration File

A bean configration file is an XML file that contains all objects instantiated when the container starts.



The Main Class

Sample Output

Download the Project




Got comments or suggestions? We disabled the comments on this site to fight off spammers, but you can still contact us via our Facebook page!.

You Might Also Like