<bean id="corporateEventDao" class="spring.context.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="classpath:jdbc.properties"/>
[b]jdbc.properties配置文件[/b]
jdbc.url=jdbc:db2://182.119.171.82:50000/VOSTRO
jdbc.driverClassName=com.ibm.db2.jcc.DB2Driver
jdbc.username=vostro
jdbc.password=vostro