<?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:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
classpath:/org/springframework/beans/factory/xml/spring-beans-4.1.xsd
http://www.springframework.org/schema/context
classpath:/org/springframework/context/config/spring-context-4.1.xsd
http://www.springframework.org/schema/tx
classpath:org/springframework/transaction/config/spring-tx-4.1.xsd"
default-lazy-init="false"> <!-- <context:property-placeholder location="classpath:spring/datasource.properties" /> --> <bean id="dataSource1" class="org.apache.tomcat.jdbc.pool.DataSource" destroy-method="close">
<property name="poolProperties">
<bean class="org.apache.tomcat.jdbc.pool.PoolProperties">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.user}" />
<property name="password" value="${jdbc.password}" />
<!-- Register the pool with JMX. In order for the connection pool object to create the MBean. -->
<property name="jmxEnabled" value="true" />
<!-- The indication of whether objects will be validated by the idle object evictor. -->
<property name="testWhileIdle" value="true" />
<!-- The indication of whether objects will be validated before being borrowed from the pool. -->
<property name="testOnBorrow" value="false" />
<property name="testOnReturn" value="false" />
<property name="initialSize" value="${jdbc.initialPoolSize}" />
<property name="maxActive" value="${jdbc.maxActive}" />
<property name="maxWait" value="${jdbc.maxWait}" />
<property name="minIdle" value="${jdbc.minIdle}" />
<property name="maxIdle" value="${jdbc.maxIdle}" />
<property name="maxAge" value="60000" />
<!-- The number of milliseconds to sleep between runs of the idle connection validation/cleaner thread. -->
<property name="timeBetweenEvictionRunsMillis" value="15000" />
<!-- The minimum amount of time an object may sit idle in the pool before it is eligible for eviction. -->
<property name="minEvictableIdleTimeMillis" value="60000" />
<property name="removeAbandoned" value="true" />
<property name="removeAbandonedTimeout" value="30" />
<property name="validationQuery" value="SELECT 1" />
<property name="validationInterval" value="30000" />
</bean>
</property>
</bean> <bean id="ucenterSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource1" />
<property name="mapperLocations" value="classpath:mybatis/mapper/ibs/*/*Dao.xml"></property>
</bean> <bean name="ucenterMapperScannerConfigurer" class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.lime.ibs.*.dao" />
<property name="sqlSessionFactoryBeanName" value="ucenterSessionFactory"></property>
</bean> <bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource1" />
</bean>
<!-- enable transaction annotation support -->
<tx:annotation-driven transaction-manager="txManager" /> </beans>

能源项目xml文件 -- app-datasource.xml的更多相关文章

  1. 使用Pull解析器生成XML文件和读取xml文件

    有些时候,我们需要生成一个XML文件,生成XML文件的方法有很多,如:可以只使用一个StringBuilder组拼XML内容,然后把内容写入到文件中:或者使用DOM API生成XML文件,或者也可以使 ...

  2. Maven入门2-pom.xml文件与settings.xml文件

    Maven入门2-pom.xml文件与settings.xml文件 本文内容来源于官网文档部分章节,settings.xml文件:参考http://maven.apache.org/settings. ...

  3. C# 操作XML文件,用XML文件保存信息

    using System; using System.Collections.Generic; using System.Text; using System.Xml; using System.IO ...

  4. java读取xml文件报“org.xml.sax.SAXParseException: Premature end of file” .

    背景:java读取xml文件,xml文件内容只有“<?xml version="1.0" encoding="UTF-8"?>”一行 java读取该 ...

  5. 创建xml文件、解析xml文件

        1.创建XML文件: import codecs import xml.dom.minidom doc=xml.dom.minidom.Document() print doc root=do ...

  6. Java中使用DOM4J来生成xml文件和解析xml文件

    一.前言 现在有不少需求,是需要我们解析xml文件中的数据,然后导入到数据库中,当然解析xml文件也有好多种方法,小编觉得还是DOM4J用的最多最广泛也最好理解的吧.小编也是最近需求里遇到了,就来整理 ...

  7. 【maven】maven创建web项目-pom文件提示web.xml is missing and <failOnMissingWebXml> is set to true

    使用maven创建web项目,选择war类型后,pom文件红叉 提示web.xml is missing and <failOnMissingWebXml> is set to true ...

  8. 创建Xml文件与修改Xml文件

    /// <summary> /// 修改节点 /// </summary> /// <param name="user">UserSafe 实体 ...

  9. Servlet(九):web.xml文件和server.xml文件

    Web.xml 文件使用总结:作用: 存储项目相关的配置信息,保护 Servlet.解耦一些数据对程序的依赖.使用位置: 每个 Web 项目中Tomcat 服务器中(在服务器目录 conf 目录中)区 ...

  10. Android 解析XML文件和生成XML文件

    解析XML文件 public static void initXML(Context context) { //can't create in /data/media/0 because permis ...

随机推荐

  1. shell 中的>文件重定向符 和 标准输入、输出、错误以及 2&1 的含义*

    http://www.cnblogs.com/chenmh/p/5382044.html 问:其中 的2>&1是怎么回事? . test.sh > test.log 2>&a ...

  2. 【Java】斐波那契数列(Fibonacci Sequence、兔子数列)的3种计算方法(递归实现、递归值缓存实现、循环实现、尾递归实现)

    斐波那契数列:0.1.1.2.3.5.8.13………… 他的规律是,第一项是0,第二项是1,第三项开始(含第三项)等于前两项之和. > 递归实现 看到这个规则,第一个想起当然是递归算法去实现了, ...

  3. Session对象实例

    using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...

  4. js将数组元素随机排序的方法

    在群里看见的一个面试题,试了一下,还是可以做出来的,但是需要查资料,主要是岁一些方法了解的不清楚,可能这个跟我平时不太注重基础理论有关系,像什么构造函数啊,我根本就不关心什么叫构造函数,我一直都以为我 ...

  5. How can I retrieve the remote git address of a repo?

    When you want to show an URL of remote branches, try: git remote -v

  6. C++学习网站

    1. CPLUSPLUS 2. CPROGRAMMING

  7. HDU 5430 Reflect(欧拉函数)

    题目: http://acm.hdu.edu.cn/showproblem.php?pid=5430 从镜面材质的圆上一点发出一道光线反射NNN次后首次回到起点. 问本质不同的发射的方案数. 输入描述 ...

  8. iOS - UIApplication

    前言 NS_CLASS_AVAILABLE_IOS(2_0) @interface UIApplication : UIResponder @available(iOS 2.0, *) public ...

  9. alloc && afree

    #define ALLOCSIZE 10000 static char allocbuf[ALLOCSIZE]; static char *allocp = allocbuf; char *alloc ...

  10. c point

    a[i] 与 *(a+i) 是等价的. 事实上在计算a[i]的值时,c语言首先将前者转换为后者形式, 而且,通常而言,用指针编写的程序要比用数组下标编写的程序执行速度快,(为什么?) 因此,应该尽量用 ...