Created
April 17, 2014 14:43
Spring Context
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xmlns:tx="http://www.springframework.org/schema/tx" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd | |
http://www.springframework.org/schema/context | |
http://www.springframework.org/schema/context/spring-context-3.2.xsd | |
http://www.springframework.org/schema/tx | |
http://www.springframework.org/schema/tx/spring-tx-3.2.xsd"> | |
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> | |
<property name="driverClassName" value="org.postgresql.Driver"/> | |
<property name="url" value="jdbc:postgresql://localhost:5432/usecase"/> | |
<property name="username" value="postgres"/> | |
<property name="password" value="########"/> | |
</bean> | |
<context:component-scan base-package="ca.credativ.jdbc" /> | |
<tx:annotation-driven transaction-manager="txManager"/> | |
<!-- a PlatformTransactionManager is still required --> | |
<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> | |
<!-- (this dependency is defined somewhere else) --> | |
<property name="dataSource" ref="dataSource"/> | |
</bean> | |
</beans> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment