Is there a way to use the relative path, say, relative to the class path or / META -INF in the Spring bean file ? This is a little different than using ServletContextto get such information.
For example: I am trying to determine the file name for the embedded H2 database.
<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="" />
~/mydbnot so desirable because it depends on how and where you deploy the application, the home directory may not be there ... how can I make it write, for example /WEB-INF/dbstore/,?
BTW - I tried "classpath:" as suggested, in this case it does not work.
source
share