title: Spring boot application.properties maven multi-module projects
body: <p>We are using spring boot in a multi-module project.</p>
  
  <p>We have a Domain access module which has the common domain object classes, repositories, together with configuration for the datasource, JPA, Hibernate, etc. These are configured using a application.properties. We put all this configuration into the common module to save duplicating these common configurations in the higher level modules.</p>
  
  <p>This all works fine when building the domain module, so the configurations are loaded correctly in the test units. </p>
  
  <p>However the problems start when we try to use the domain module in the higher layer modules; they have their own application.properties which means Spring loads them and not the the Domain module application.properties, which this means the data source is not configured because only the higher module application.properties are loaded. </p>
  
  <p>What we would like is both the domain module and higher level application properties to be loaded by Spring. But we can't see any easy way to do this.</p>
  
  <p>I'm thinking this must be a common problem, and wonder if there any recommended solutions for this problem? </p>
  
  <p>As we are using spring-boot the solution should ideally use annotations instead of applictionContext.xml.</p>