title: Can I use relative path in Spring bean definition?
body: <p>Is there a way to use relative path, say relative to class path or /META-INF in <strong>Spring bean definition file</strong>? This is a bit different from using <code>ServletContext</code> to obtain such info.</p>
  
  <p>For example: I am trying to define a filename for a embedded database H2.</p>
  
  <pre><code>&lt;bean id="myDataSource"
      class="org.springframework.jdbc.datasource.DriverManagerDataSource"
      p:driverClassName="org.h2.Driver"
      p:url="jdbc:h2:~/mydb;AUTO_SERVER=TRUE"
      p:username=""
      p:password="" /&gt;
  </code></pre>
  
  <p><code>~/mydb</code> is not so desired as it depends on how and where you deploy the application, the home directory may not be there ... how can I make it to write to, for example, <code>/WEB-INF/dbstore/</code>? </p>
  
  <p>BTW - I tried "classpath:" as suggested, it doesn't seem to work in this case.</p>