title: How to inherit application.properties with spring boot multiple modules
body: <p>I using spring boot multiple modules and i want inherit application.properties from parent . I have parent module :  spring-ecommere-demo and sub module : model , core and security. In parent modules i put some config jdbc look like : </p>
  
  <p><strong>application.properties</strong> (parent module)</p>
  
  <pre><code>spring.datasource.url=jdbc:mysql://localhost:3306/BaoTrung
  spring.datasource.username=root
  spring.datasource.password=123456
  spring.jpa.show-sql=true
  </code></pre>
  
  <p>And in sub module security i specific config look like:</p>
  
  <p><strong>application-security.properties</strong> (security module)</p>
  
  <pre><code>app.jwtSecret= JWTSuperSecretKey
  app.jwtExpirationInMs = 604800000
  </code></pre>
  
  <p>And config in Spring Boot application in security module look like : </p>
  
  <pre><code>@SpringBootApplication(scanBasePackages = "springecommeredemo")
  @PropertySources({
          @PropertySource("application-security.properties")
  })
  </code></pre>
  
  <p>But when i run it, it throw me exception </p>
  
  <p>Description:</p>
  
  <blockquote>
    <p>Failed to configure a DataSource: 'url' attribute is not specified and
    no embedded datasource could be configured.</p>
    
    <p>Reason: Failed to determine a suitable driver class</p>
    
    <p>Action:</p>
    
    <p>Consider the following:   If you want an embedded database (H2, HSQL or
    Derby), please put it on the classpath.   If you have database settings
    to be loaded from a particular profile you may need to activate it
    (the profiles dev are currently active).</p>
  </blockquote>
  
  <p>It mean sub module security can't inherit properties from parent project. How to inherit all properties from parent module. Because i using same database , i don't want config duplicate jdbc in my project. I want inherit common properties.Please help</p>