<?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:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="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/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<!-- 使用扫描加注解 ,将实体交给spring 管理 -->
<context:component-scan base-package="org.taink" />
<!-- propertiesConfigure -->
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:jdbc.properties</value>
</list>
</property>
</bean>
<!-- dataSource Configure -->
<bean id="dataSource"
class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close" dependency-check="none">
<property name="driverClass" value="org.gjt.mm.mysql.Driver">
</property>
<property name="jdbcUrl"
value="jdbc:mysql://localhost:3306/company?useUnicode=true&characterEncoding=UTF-8">
</property>
<property name="user" value="orca"></property>
<property name="password" value="orca"></property>
<!--初始化时获取的连接数,取值应在minPoolSize与maxPoolSize之间。Default: 3 -->
<property name="initialPoolSize" value="1" />
<!--连接池中保留的最小连接数。-->
<property name="minPoolSize" value="1" />
<!--连接池中保留的最大连接数。Default: 15 -->
<property name="maxPoolSize" value="300" />
<!--最大空闲时间,60秒内未使用则连接被丢弃。若为0则永不丢弃。Default: 0 -->
<property name="maxIdleTime" value="60" />
<!--当连接池中的连接耗尽的时候c3p0一次同时获取的连接数。Default: 3 -->
<property name="acquireIncrement" value="5" />
<!--每60秒检查所有连接池中的空闲连接。Default: 0 -->
<property name="idleConnectionTestPeriod" value="60" />
</bean>
<!-- sqlMapClient config -->
<bean id="sqlMapClient"
class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation"
value="classpath:SqlMapConfig.xml" />
<property name="dataSource" ref="dataSource" />
</bean>
<!-- transaction manager config
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
-->
<!-- annotation type config transaction -->
<tx:annotation-driven transaction-manager="transactionManager" />
</beans>
分享到:
相关推荐
赠送jar包:nacos-config-spring-boot-autoconfigure-0.2.7.jar; 赠送原API文档:nacos-config-spring-boot-autoconfigure-0.2.7-javadoc.jar; 赠送源代码:nacos-config-spring-boot-autoconfigure-0.2.7-sources...
赠送jar包:spring-cloud-starter-alibaba-nacos-config-2021.1.jar; 赠送原API文档:spring-cloud-starter-alibaba-nacos-config-2021.1-javadoc.jar; 赠送源代码:spring-cloud-starter-alibaba-nacos-config-...
赠送jar包:nacos-config-spring-boot-autoconfigure-0.2.7.jar; 赠送原API文档:nacos-config-spring-boot-autoconfigure-0.2.7-javadoc.jar; 赠送源代码:nacos-config-spring-boot-autoconfigure-0.2.7-sources...
赠送jar包:spring-security-config-5.0.7.RELEASE.jar; 赠送原API文档:spring-security-config-5.0.7.RELEASE-javadoc.jar; 赠送源代码:spring-security-config-5.0.7.RELEASE-sources.jar; 赠送Maven依赖信息...
赠送jar包:spring-security-config-5.5.2.jar; 赠送原API文档:spring-security-config-5.5.2-javadoc.jar; 赠送源代码:spring-security-config-5.5.2-sources.jar; 赠送Maven依赖信息文件:spring-security-...
赠送jar包:spring-security-config-5.6.1.jar; 赠送原API文档:spring-security-config-5.6.1-javadoc.jar; 赠送源代码:spring-security-config-5.6.1-sources.jar; 赠送Maven依赖信息文件:spring-security-...
spring-boot-config-yaml.jarspring-boot-config-yaml.jarspring-boot-config-yaml.jarspring-boot-config-yaml.jarspring-boot-config-yaml.jarspring-boot-config-yaml.jarspring-boot-config-yaml.jarspring-boot...
赠送jar包:spring-security-config-5.2.0.RELEASE.jar; 赠送原API文档:spring-security-config-5.2.0.RELEASE-javadoc.jar; 赠送源代码:spring-security-config-5.2.0.RELEASE-sources.jar; 赠送Maven依赖信息...
赠送jar包:spring-security-config-5.3.9.RELEASE.jar; 赠送原API文档:spring-security-config-5.3.9.RELEASE-javadoc.jar; 赠送源代码:spring-security-config-5.3.9.RELEASE-sources.jar; 赠送Maven依赖信息...
spring-cloud-starter-alibaba-nacos-config-2.1.0.RELEASE.jar
赠送jar包:spring-cloud-starter-alibaba-nacos-config-2021.1.jar; 赠送原API文档:spring-cloud-starter-alibaba-nacos-config-2021.1-javadoc.jar; 赠送源代码:spring-cloud-starter-alibaba-nacos-config-...
赠送jar包:spring-security-config-4.2.8.RELEASE.jar; 赠送原API文档:spring-security-config-4.2.8.RELEASE-javadoc.jar; 赠送源代码:spring-security-config-4.2.8.RELEASE-sources.jar; 包含翻译后的...
赠送jar包:spring-security-config-5.0.7.RELEASE.jar; 赠送原API文档:spring-security-config-5.0.7.RELEASE-javadoc.jar; 赠送源代码:spring-security-config-5.0.7.RELEASE-sources.jar; 赠送Maven依赖信息...
赠送jar包:spring-security-config-5.6.1.jar; 赠送原API文档:spring-security-config-5.6.1-javadoc.jar; 赠送源代码:spring-security-config-5.6.1-sources.jar; 赠送Maven依赖信息文件:spring-security-...
赠送jar包:spring-security-config-3.2.3.RELEASE.jar; 赠送原API文档:spring-security-config-3.2.3.RELEASE-javadoc.jar; 赠送源代码:spring-security-config-3.2.3.RELEASE-sources.jar; 赠送Maven依赖信息...
赠送jar包:spring-security-config-5.3.9.RELEASE.jar; 赠送原API文档:spring-security-config-5.3.9.RELEASE-javadoc.jar; 赠送源代码:spring-security-config-5.3.9.RELEASE-sources.jar; 赠送Maven依赖信息...
赠送jar包:spring-security-config-5.2.0.RELEASE.jar; 赠送原API文档:spring-security-config-5.2.0.RELEASE-javadoc.jar; 赠送源代码:spring-security-config-5.2.0.RELEASE-sources.jar; 赠送Maven依赖信息...
赠送jar包:spring-security-config-3.2.3.RELEASE.jar; 赠送原API文档:spring-security-config-3.2.3.RELEASE-javadoc.jar; 赠送源代码:spring-security-config-3.2.3.RELEASE-sources.jar; 赠送Maven依赖信息...
spring-cloud-config-svn-refresh:配置中心svn版本示例,客户端refresh版本示例 spring-cloud-config-eureka:配置中心服务化和高可用代码示例 spring-cloud-config-eureka-bus:配置中心和消息总线示例(配置中心...
curator-test-rule.zip,此项目提供了一个JUnit测试规则,用于管理底层ZookePerServer的启动和关闭。testrule还包括一种获取curatorframework实例的方法,这些实例根据rule.junit testrule的作用域自动连接和断开与...