I have a large application that I want to break into managed modules. I am using spring with Jpa (Hibernate as a provider). I came up with a structure in which I have a main module containing all entity classes and Tao, while other modules use the main module regarding persistence, and each of them will have its own set of service classes and controllers.

All Jpa and spring configuration files are in the main module. With this installation, I have to deal with the problem of autowiring dao beans in modules using the main module. So my question is: is it possible to autwire beans from the main module in other modules (or, perhaps, use the context between the modules)? I am also open to suggestions regarding structure if there is a better way to do this.
thank
source
share