title: How to replace spring property placeholders in a simple java program
body: <p>I am working with Java and spring boot apps. I have a property file which needs to be added as environmental variables for a docker image at run time. Some of the properties are filtered through the existing Environment when they are used via placeholders as below.</p>
  
  <pre><code>app.name=MyApp
  app.description=${app.name} is a Spring Boot application
  </code></pre>
  
  <p>I am writing a sample java file to read this property file and create a map object with some filtered properties. In this process how can I replace the placeholders with the actual property values?</p>
  
  <p>I have tried looking for a key and replacing using <code>getProperty</code> method. But I would like to avoid looking up hard coded property key names in order to avoid maintenance difficulties. 
  Thanks in advance.</p>