So I created a new maven pom based webapp using intelliJ 11.
Now I want to separate out my various layers of the application, so I currently I have:
/myproj
/myproj-common (maven module)
/myproj-services (maven module)
/src/main/webapp (spring mvc application)
So I am using the following:
spring mvc
hibernate
So I will create Dao for each entity, and then a service layer that will use the Dao’s and wrap other business logic etc.
How should I setup my maven modules properly without making it too complicated?
Should I create a separate interface module that my other modules will use?
Looking for some practical advice.
I’m using maven to build this also.
I tried this before and moving things into separate modules can’t be a little tricky, so looking for some guidance on how to do this.
Update
Should I have a separate module for my entities also?
The simplest way is use only one maven module and do separation on package level.
If you need more I can recomend this setup:
myproj-services – entity classes, service interfaces
myproj-services-impl – implementation dao and services
myproj-ui – your spring mvc classes
Ui depends only on services and services-impl depends only on services.