title: Organizing a Spring-mvc project with many sub applications
body: <p>I am starting with a project in Spring-mvc which basically is made up of 3 parts </p>
  
  <p>1) Frontend</p>
  
  <p>2) Backend (admin)</p>
  
  <p>3) Web service</p>
  
  <p>What would be best way to organize these parts so that I can reuse the domain and DAO layer objects wherever I can and at the same time keep the packages separate (so as to avoid class names such as FrontendCategoryController and BackendCategoryController in the same package) ?</p>
  
  <p>Also would it be a good idea to have common config and the pom.xml file for all these parts ?</p>
  
  <p>As of now I have started with the project structure generated by maven as per the webapp archetype </p>
  
  <p>Edit: </p>
  
  <p>One way I am thinking of doing this is - </p>
  
  <pre><code>myapp
    -- src
        -- main
             --java
             --resources
        -- backend
             --java
             -- resources
        -- webservice
             -- java 
             -- resources
  </code></pre>
  
  <p>in all java directories, the package names will be same </p>
  
  <p>Would this be a correct approach</p>
  
  <p>Thanks</p>