ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Twelve Best Practices For Spring XML Configurations
Subject:   Tip 13: Modularize the context files
Date:   2006-09-29 07:39:06
From:   AmitDV
In a large project, there are a lot of bean defintions. The context files usually grow to unmanageble size. It is usually a good idea to modularize the context files.


We can have two approaches for modularizing the context files :
1. By functionality
2. By layers


It is good idea to modularize the context files as per the source code modules. This makes the code more comprehensible.


Also, while loading the application context, avoid using wild cards (applicationContext*.xml) and use the file names explicitly. This ensures better control of the code.