<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<propertyname="driverClassName"><value>${jdbc.driverClassName}</value></property>
<propertyname="url"><value>${jdbc.url}</value></property>
<propertyname="username"><value>${jdbc.username}</value></property>
<propertyname="password"><value>${jdbc.password}</value></property>
</bean>
<bean id="dataSource"class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="url">
<value> jdbc:mysql://localhost:3306/db0</value>
</property>
<property name="username">
<value>test</value>
</property>
<property name="password">
<value>test</value>
</property>
<property name="maxActive">
<value>255</value>
</property>
<property name="maxIdle">
<value>2</value>
</property>
<property name="maxWait">
<value>120000</value>
</property>
</bean>
<bean id="dataSource"class="org.springframework.jndi.JndiObjectFactoryBean">
<propertyname="jndiName"><value>java:comp/env/jdbc/roseindiaDB_local</value></property>
</bean>
1.<bean id="dataSource"class="com.mchange.v2.c3p0.ComboPooledDataSource"
2. destroy-method="close">
3. <propertyname="driverClass" value=" com.mysql.jdbc.Driver"/>
4. <propertyname="jdbcUrl" value=" jdbc:mysql://localhost:3306/db0"/>
5. <propertyname="user"value="admin"/>
6. <propertyname="password"value="1234"/>
7.</bean>
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |