I would like to know how to access to an environment variable in Spring. For example I would like to use some environment variable in order to set the url property:
but I don't know which environment variables are accepted by Spring configuration files and how to use them (syntax), for example: ${user.home}, $HOME, etc. Any way are there any Spring Environment variables, could be used on the Spring configuration files.Code:<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName"><value>org.hsqldb.jdbcDriver</value></property> <property name="url"> <value>jdbc:hsqldb:P:/springapp/v6/springapp/db/test</value> </property> </bean>
Thanks in advance,
David Leal


Reply With Quote