Skip to content

Instantly share code, notes, and snippets.

@Promichel
Created November 17, 2011 11:13
Show Gist options
  • Save Promichel/1372933 to your computer and use it in GitHub Desktop.
Save Promichel/1372933 to your computer and use it in GitHub Desktop.
Spring Property Reader
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location">
<value>classpath:project.properties</value>
</property>
</bean>
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>${jdbc.driver}</value>
</property>
<property name="url">
<value>${jdbc.url}</value>
</property>
<property name="username">
<value>${jdbc.user}</value>
</property>
<property name="password">
<value>${jdbc.password}</value>
</property>
</bean>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment