<?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"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd">
<!-- <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>${jdbc_driverClassName}</value>
</property>
<property name="url">
<value>${jdbc_url}</value>
</property>
<property name="username">
<value>${jdbc_username}</value>
</property>
<property name="password">
<value>${jdbc_password}</value>
</property>
<!– 连接属性 –>
<property name="connectionProperties">
<value>clientEncoding=UTF-8</value>
</property>
</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}"/>
<!--maxActive: 最大连接数量-->
<property name="maxActive" value="150"/>
<!--minIdle: 最小空闲连接-->
<property name="minIdle" value="5"/>
<!--maxIdle: 最大空闲连接-->
<property name="maxIdle" value="20"/>
<!--initialSize: 初始化连接-->
<property name="initialSize" value="30"/>
<!-- 连接被泄露时是否打印 -->
<property name="logAbandoned" value="true"/>
<!--removeAbandoned: 是否自动回收超时连接-->
<property name="removeAbandoned" value="true"/>
<!--removeAbandonedTimeout: 超时时间(以秒数为单位)-->
<property name="removeAbandonedTimeout" value="10"/>
<!--maxWait: 超时等待时间以毫秒为单位 1000等于60秒-->
<property name="maxWait" value="1000"/>
<!-- 在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位. -->
<property name="timeBetweenEvictionRunsMillis" value="10000"/>
<!-- 在每次空闲连接回收器线程(如果有)运行时检查的连接数量 -->
<property name="numTestsPerEvictionRun" value="10"/>
<!-- 1000 * 60 * 30 连接在池中保持空闲而不被空闲连接回收器线程-->
<property name="minEvictableIdleTimeMillis" value="10000"/>
<property name="validationQuery" value="SELECT NOW() FROM DUAL"/>
</bean>
<!-- mybatis文件配置,扫描所有mapper文件 -->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource"></property>
<!-- configLocation为mybatis属性-->
<property name="configLocation" value="classpath:conf/mybatis-config.xml"></property>
</bean>
<bean id="sqlSessionTemplate" class="org.mybatis.spring.SqlSessionTemplate">
<constructor-arg index="0" ref="sqlSessionFactory"/>
</bean>
<bean id="baseDao" class="com.pcitc.basePackage.baseDao.Impl.BaseDaoImpl">
<property name="sqlSessionTemplate">
<ref bean="sqlSessionTemplate"/>
</property>
</bean>
<!-- 对数据源进行事务管理 -->
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"></property>
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>
</beans>
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
fss-ssp-online-help.rar (47个子文件)
META-INF
MANIFEST.MF 90B
WEB-INF
web.xml 2KB
view
index.jsp 63B
classes
dao
impl
conf
mybatis-config.xml 463B
spring-mybatis.xml 4KB
spring-mvc.xml 1KB
jdbc.properties 144B
log4j.properties 673B
applicationContext.xml 860B
model
com
pcitc
dao
user
UserDao.class 216B
impl
UserDaoImpl.class 958B
impl
model
user
User.class 928B
controller
user
UserController.class 1KB
service
user
UserService.class 487B
impl
UserServiceImpl.class 955B
impl
basePackage
baseDao
Impl
BaseDaoImpl.class 3KB
BaseDao.class 833B
Utils
ObjectUtils.class 784B
mapper
user
userMapper.xml 724B
controller
service
impl
lib
jackson-mapper-asl-1.9.13.jar 762KB
spring-web-3.2.4.RELEASE.jar 611KB
commons-pool-1.5.4.jar 94KB
spring-jdbc-3.2.4.RELEASE.jar 396KB
aopalliance-1.0.jar 4KB
mail-1.4.jar 380KB
mysql-connector-java-5.1.29.jar 856KB
druid-1.0.2.jar 1.74MB
spring-aop-3.2.4.RELEASE.jar 328KB
commons-logging-1.1.1.jar 59KB
spring-core-3.2.4.RELEASE.jar 849KB
activation-1.1.jar 62KB
spring-expression-3.2.4.RELEASE.jar 192KB
spring-beans-3.2.4.RELEASE.jar 594KB
commons-dbcp-1.4.jar 157KB
spring-webmvc-3.2.4.RELEASE.jar 622KB
slf4j-api-1.5.8.jar 23KB
mybatis-3.2.4.jar 699KB
spring-context-support-3.2.4.RELEASE.jar 125KB
mybatis-spring-1.2.2.jar 48KB
log4j-1.2.15.jar 383KB
spring-test-3.2.4.RELEASE.jar 447KB
jackson-core-asl-1.9.13.jar 227KB
spring-oxm-3.2.4.RELEASE.jar 72KB
slf4j-log4j12-1.5.8.jar 9KB
spring-context-3.2.4.RELEASE.jar 843KB
spring-tx-3.2.4.RELEASE.jar 237KB
index.jsp 57B
共 47 条
- 1
资源评论
- 大不同_12016-06-03作为新手熟悉项目还是不错的
- m0_372446532018-06-28资源可运行,但是只有一个Hello World的页面,我要怎么操作,还是一脸懵
- huangshangjin2017-05-26资源不错,学习一下
- 天空上尉2016-09-12很好的资源,学习了
宝里宝气
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功