Spring dbcp配置
来源:互联网 发布:淘宝待发货订单生成器 编辑:程序博客网 时间:2024/05/17 22:12
<?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:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd">
<!-- 组件自动扫描技术 -->
<context:component-scan base-package="org.tarena.*" />
<!-- 启用AOP注解 -->
<aop:aspectj-autoproxy />
<!-- DPCP配置-->
<bean id="jdbcDataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="username" value="liupeng"/>
<property name="password" value="liupeng"/>
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://localhost:3306/liu"/>
<property name="maxActive" value="20"/>
<property name="initialSize" value="2"/>
</bean>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd">
<!-- 组件自动扫描技术 -->
<context:component-scan base-package="org.tarena.*" />
<!-- 启用AOP注解 -->
<aop:aspectj-autoproxy />
<!-- DPCP配置-->
<bean id="jdbcDataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="username" value="liupeng"/>
<property name="password" value="liupeng"/>
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://localhost:3306/liu"/>
<property name="maxActive" value="20"/>
<property name="initialSize" value="2"/>
</bean>
</beans>
需要导入如下3个jar包到lib目录下
commons-collections-3.1.jar
commons-dbcp-1.2.2.jar
commons-pool.jar
0 0
- Spring配置dbcp
- Spring dbcp配置
- spring-DBCP配置
- Spring配置DBCP数据库连接池
- spring配置dbcp连接池
- spring dbcp 连接池配置
- spring配置dbcp连接池
- Spring DBCP 数据库连接池配置
- spring dbcp连接池配置
- spring配置dbcp链接数据库
- spring配置dbcp连接池
- spring配置dbcp连接池
- 配置Spring数据源c3p0与dbcp
- 配置Spring数据源c3p0与dbcp
- 配置Spring数据源c3p0与dbcp
- spring 配置dbcp连接池不能释放,
- 配置Spring数据源c3p0与dbcp
- (转)配置Spring数据源c3p0与dbcp
- 多线程1
- 公告栏文字上下滚动效果
- RXJava源码分析(一)创建\变换\订阅的详细流程图及关键方法解释
- 1、mui app在线更新
- Java注解的介绍
- Spring dbcp配置
- 深入CloudFoundry一周年(原版)
- 主外键双表配置
- 原生js模仿小米轮播图
- bootstrap 二级导航
- OPC经验谈
- 《从零开始学Swift》学习笔记(Day 3)——Swift 2.0之后增加的关键字
- 《STL源码剖析》阅读笔记
- 《我的RobotFramework书》1-3 测试模板, Test Template