title: Overriden application.yml in multi-module Spring Boot app
body: <p>There is a Spring Boot 2 app with such a structure:</p>
  <pre><code>parent-module
      module-1
          src
              main
                  java
                  resources
                  - application.yml
      module-2
          src
              main
                  java
                  resources
                  - application.yml
  </code></pre>
  <p>Also, module-1 depends on module-2, specified in pom.xml <code>dependencies</code> section.</p>
  <p>The problem is that when I specify some properties in module-2's <code>application.yml</code> - they are not visible in main module-1's components (via <code>@Value</code> annotation).</p>
  <p>As was answered <a href="https://stackoverflow.com/a/52925721/3482923">here</a> seems like module-1's <code>application.yml</code> overrides module-2's <code>application.yml</code>. There is a workaround - if I use name <code>application.yaml</code> in module-2 everything works fine, but I'm going to add more modules and, finally, it's dirty hack.</p>
  <p>What I'm doing wrong? Should such an hierarchy of property files specified somehow?
  I will be happy to provide more details if it's needed.</p>
  <p>Thank you!</p>