title: spring - read environment variables from inside the application.properties file
body: <p>I specified Spring properties inside the <strong>application.properties</strong> file. How can i populate those properties from the environment variables?</p>
  
  <p>Here is what I tried, but it doesn't seem to work:</p>
  
  <p><strong>application.properties</strong></p>
  
  <pre><code>spring.datasource.url=jdbc:postgresql://#{ systemProperties['DATABASE_HOST']}:5432/dbname
  spring.datasource.username = postgres
  spring.datasource.password = postgres
  </code></pre>