Hi all,
I have configured DataSource in applicationContext, using propertyPlaceHolder
I would like to load the production property file in production environment, and the test property in test environment.Code:<beans> <!-- the property configurer --> <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <!-- default values for testing --> <value>classpath:SqlConnStringDbExp.properties</value> </list> </property> </bean> <bean id="dataSource" destroy-method="close" class="it.genialloyd.startup.GenialBasicDataSource"> <property name="driverClassName"> <value>net.sourceforge.jtds.jdbc.Driver</value></property> <property name="url"> <value>${jdbc.urljtds}</value></property> <property name="username"><value>uteappl</value></property> <property name="password"><value>${jdbc.password}</value></property> </bean>
I've just found a solution to place the property outside the classpath, so different server have different file, not overwritten by the class file.
Any hint?<value>file:c/pathtopropery/SqlConnStringDbExp.properties</value>
Thanks


Reply With Quote
