There are many reasons to declare the beans in more than one xml file. The most important reason is to maintain the code clear with a logical separation of the content of the file. The second reason is that when the application begin big only one file is not enough for the configuration.

In Spring is easy to split the content of the applicationContext.xml:


You have to declare the **contextConfigLocation



/WEB-INF/yourApplicationServices.xml, /WEB-INF/yourApplicationDatabase
` You can use Ant-style pattern to call your files e.g. /WEB-INF/yourApplication*.xml** [Spring reference](