I am creating an application in which I shared a project in different modules, such as (domain, repository, service and network), as well as many common maven projects for sending mail, formatting text, etc. I also use Spring.
Currently, I only have a Spring application context file in a web project. However, since I am creating common projects for text formatting, etc. that encapsulate libraries (like freemarker) from a real application that I don't like, I have to specify the library dependent configuration in the Spring application context file in the web project.
The question is whether it is correct to have a separate Spring context file for each module, and then import the context files in the projects in which I use them. Is this the right way to do this, or are there any better ways?
I am wondering how to solve this when I use XML files, not JavaConfig.
java spring java-ee spring-mvc maven
Luckyluke
source share