Created
February 26, 2018 10:02
-
-
Save welsayedaly/b6ed2aaac099759bc8cdbaa0c54e6bc6 to your computer and use it in GitHub Desktop.
spring database xml-configuration
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
<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"; | |
xsi:schemaLocation=" | |
http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | |
http://www.springframework.org/schema/context | |
http://www.springframework.org/schema/context/spring-context-3.0.xsd">; | |
<bean id="corporateEventDao" class="com.example.JdbcCorporateEventDao"> | |
<property name="dataSource" ref="dataSource"/> | |
</bean> | |
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> | |
<property name="driverClassName" value="${jdbc.driverClassName}"/> | |
<property name="url" value="${jdbc.url}"/> | |
<property name="username" value="${jdbc.username}"/> | |
<property name="password" value="${jdbc.password}"/> | |
</bean> | |
<context:property-placeholder location="jdbc.properties"/> | |
</beans> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment