日期:2014-05-19 浏览次数:20832 次
<?xml version="1.0" encoding="UTF-8"?> <beans> <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location" value="classpath:conf/jdbc.peoperties"/> </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}" /> <property name="maxActive" value="100"/> <property name="maxIdle" value="20"/> <property name="maxWait" value="1000"/> </bean> <bean id= "transactionManager" class= "org.springframework.jdbc.datasource.DataSourceTransactionManager" > <property name= "dataSource" > <ref bean= "dataSource" /> </property> </bean> </beans><?xml version="1.0" encoding="UTF-8"?> <beans> <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location" value="classpath:conf/jdbc.peoperties"/> </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}" /> <property name="maxActive" value="100"/> <property name="maxIdle" value="20"/> <property name="maxWait" value="1000"/> </bean> <bean id= "transactionManager" class= "org.springframework.jdbc.datasource.DataSourceTransactionManager" > <property name= "dataSource" > <ref bean= "dataSource" /> </property> </bean> </beans>