title: How to set system environment variables in applicaton.properties the 12 factor way?
body: <p>I am having trouble getting values from my environment variables.. There are many simliar questions. But <strong>NONE</strong> of them worked for me</p>
  
  <p><strong>Application.properties</strong></p>
  
  <pre><code>spring.datasource.platform=postgres
  spring.datasource.url=jdbc:postgresql://localhost:5432/mydb
  spring.datasource.username=${SPRING_DATASOURCE_USERNAME}
  spring.datasource.password=${SPRING_DATASOURCE_PASSWORD}
  </code></pre>
  
  <p><strong>System variables</strong></p>
  
  <pre><code>Variable name : SPRING_DATASOURCE_USERNAME
  Variable Value : dbuser
  
  Variable name : SPRING_DATASOURCE_PASSWORD
  Variable Value : 123456789
  </code></pre>
  
  <p><strong>ERROR</strong></p>
  
  <pre><code>invalid username/password; logon denied
  </code></pre>
  
  <p>but when I hard code it, it works fine.</p>
  
  <p><strong>Update</strong></p>