I am creating an application where I have separated the project in different modules such as (domain, repository, service and web) as well as many general purpose maven projects for mail sending, text formatting etc. I am also using Spring.
Currently I have the Spring application context file only in the web project. However, since I am creating general pupose projects for text formatting etc that encapsulates libraries (e.g. freemarker) from the actual application I don't like that I have to specify library dependent configuration in the Spring application context file in the web project.
The question is whether or not it is correct to have a separate Spring applicaiton context file for each module and then import the context files in the projects where I use them. Is this the correct way to do it, or are there better ways?
I am interested in how to solve this when I use XML files, not JavaConfig.