title: Getting the present working directory using spring
body: <p>This is the code to get the present working directory of a java application at runtime.  </p>
  
  <pre><code>String currentWorkingDirectory = System.getProperty("user.dir")+System.getProperty("file.separator");
  </code></pre>
  
  <p>Is there any way by which this can be configured using the spring-context xml.</p>
  
  <p>For ex:</p>
  
  <pre><code>&lt;bean id="csvReportGenerator" class="some.path.CSVReportGenerator"&gt;  
  &lt;constructor-arg name="outputFileName" value="${currentWorkingDirectory}/${reportOutputFileGeneric}"/&gt;
  &lt;/bean&gt;
  </code></pre>