zoukankan      html  css  js  c++  java
  • spring-mybatis.xml配置文件

    
    
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <beans xmlns="http://www.springframework.org/schema/beans"
     3        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     4        xmlns:tx="http://www.springframework.org/schema/tx"
     5        xsi:schemaLocation="http://www.springframework.org/schema/beans
     6         http://www.springframework.org/schema/beans/spring-beans.xsd
     7         http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
     8 
     9     <bean id="dataSources" class="com.mchange.v2.c3p0.ComboPooledDataSource">
    10         <property name="driverClass" value="com.mysql.jdbc.Driver"/>
    11         <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/phone"/>
    12         <property name="user" value="root"/>
    13         <property name="password" value="123456"/>
    14     </bean>
    15 
    16     <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
    17         <property name="dataSource" ref="dataSources"/>
    18         <property name="mapperLocations" value="classpath:mapper/*.mapper.xml"/>
    19     </bean>
    20 
    21     <bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    22         <property name="dataSource" ref="dataSources"/>
    23     </bean>
    24     <tx:annotation-driven transaction-manager="txManager"/>
    25 
    26 </beans>
    
    
    


    历经苦难而不厌,此乃阿修罗之道。
  • 相关阅读:
    CentOS 6.7 如何启用中文输入法
    10w数组去重,排序,找最多出现次数(精华)
    win10虚拟机搭建Hadoop集群(已完结)
    Linux常用命令
    调用接口显示Required request body is missing
    Git 的使用
    Navicat创建事件,定时更新数据库
    mysql生成UUID
    时间戳与字符串相互转换
    牛客中的错题
  • 原文地址:https://www.cnblogs.com/echo1314/p/10192597.html
Copyright © 2011-2022 走看看