<?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. PHP redis负载均衡代码

    <?php /** * This is a Redis exntend class * jay.w */ class RedisClient { public static $instance ...

  2. linux硬盘分区格式化及挂载

    1.硬盘的接口类型 硬盘的接口一般分为两种,一种是IDE并行接口,一种是SATA串行接口, 在linux上面IDE接口的硬盘被识别为/dev/hd[a-z]这样的设备,其中hdc表示光驱设备,这是因为 ...

  3. yum报错

    用man clean all man yum,可以看到,clean选项的作用是: Is  used  to clean up various things which accumulate in th ...

  4. xcode下载地址

    本帖最后由 tsingjun 于 12/9/20 04:46 PM 编辑 Xcode 4.4.1正式版下载地址 http://kuai.xunlei.com/d/UXZFTWONQLUD XCode ...

  5. sql语句中的注释符号

    sql语句中的注释符号     mysql # 到该行结束.-- 到该行结束 以及 的注释方格:mysql> SELECT 1+1;     # 这个注释直到该行结束mysql> SELE ...

  6. 【转】利用Pspice分析放大器环路的稳定性

    文章来源: http://www.21ic.com/app/test/201108/90808.htm 虽然在较低频率下可以较轻松地检查一个简单放大器的稳定性,但评估一个较为复杂的电路是否稳定,难度可 ...

  7. Hibernate 配置

    package com.shuyinghengxie.doudou; import static org.junit.Assert.*; import org.hibernate.SessionFac ...

  8. wince下的CPU和内存占用率计算

    #include <Windows.h> DWORD Caculation_CPU(LPVOID lpVoid) { MEMORYSTATUS MemoryInfo; DWORD Perc ...

  9. XShell 安装与虚拟机连接

    XShell:是liunx的远程管理工具 为啥要用这个工具呢?因为在古老的liunx字符命令下,是看不到中文的,要么使用liunx的图形化界面(支持中文),要么使用远程管理工具,是在windows中的 ...

  10. ettercap

    作者: 官网:http://ettercap.github.io/ettercap/ 源码:https://github.com/Ettercap/ettercap 功能:arp欺骗