Skip to content

Instantly share code, notes, and snippets.

@rollxx
Created July 8, 2014 14:03
Show Gist options
  • Save rollxx/7f5ccda0c0988d71d442 to your computer and use it in GitHub Desktop.
Save rollxx/7f5ccda0c0988d71d442 to your computer and use it in GitHub Desktop.
spring datasource config with default transaction isolation
<bean id="datasource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="${db.driverClass}" />
<property name="url" value="${db.connectionURL}" />
<property name="username" value="${db.user.username}" />
<property name="password" value="${db.user.password}" />
<property name="validationQuery" value="${db.connection.validationQuery}"/>
<property name="testOnBorrow" value="${db.connection.testOnBorrow}"/>
<property name="defaultTransactionIsolation" value="2"/>
</bean>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment