title: How to inject environmental variables inside spring xml configuration?
body: <p>AWS talks about  <code>System.getProperty("JDBC_CONNECTION_STRING")</code> in <a href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Java.managing.html" rel="noreferrer">http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Java.managing.html</a> after we set up our environmental variables. All great except I can't call <code>System.getProperty</code> inside my Spring XML configuration code nor I can call for resource bundle shortcuts since resources bundle itself has to extract somehow these environmental variables to serve them. Could you kindly help me please to convert this example config to use environmental variables ? :-)</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"&gt;
      &lt;property name="driverClassName" value="com.mysql.jdbc.Driver" /&gt;
      &lt;property name="url" value="jdbc:mysql://secrethost:007/whois?autoReconnect=true" /&gt;
      &lt;property name="username" value="bond" /&gt;
      &lt;property name="password" value="abuginsidemistycorner" /&gt;
      &lt;property name="initialSize" value="100" /&gt;
  
      &lt;property name="minEvictableIdleTimeMillis"&gt;
          &lt;value&gt;300000&lt;/value&gt;
      &lt;/property&gt;
  
      &lt;property name="timeBetweenEvictionRunsMillis"&gt;
          &lt;value&gt;60000&lt;/value&gt;
      &lt;/property&gt;
  
      &lt;property name="maxIdle" value="20" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>I was not able to understand what do people do here:</p>
  
  <p><a href="https://stackoverflow.com/questions/1841857/can-i-use-an-environment-variable-based-location-for-spring-filesystemresource/1843010#1843010">Can I use an Environment variable based location for Spring FileSystemResource?</a> which would work for recent spring version?</p>