title: Spring boot application.yml configuration bugging out
body: <p>Ok, so, I've noticed a strange bug with spring boot's application.yml configuration.</p>
  
  <p>I have a normal application.yml and take my values as</p>
  
  <p>@Value("${path.to.value}")
  private type myVal</p>
  
  <p>This works fine in devel mode when I have my config inside my src/main/res dir however when I upload the jar to a server and run it like this:</p>
  
  <pre><code>java -Xms2024m -Xmx6564m -Dlog4j.configuration=/path/to/log4j2.xml -Dspring.profiles.active=dev    -Dspring.config.location=/path/to/application.yml -jar myApp.jar
  </code></pre>
  
  <p>The configuration isn't read by Spring,
  even worse, the parameters that I set in my previous config seem to be hard-coded at compilation O.o. So the application doesn't fail, rather, it runs with the parameter from the application.yml that was in the same directory as it during compilation, which seems like a very very dangerous bug if application.yml is indeed intended as a configuration file and I'm not misinterpreting the whole thing.</p>
  
  <p>How am I supposed to specific the path to an application.yml ? How comes config values get hard-coded at compile time in my code ? Is there a way to stop this ?</p>