zoukankan      html  css  js  c++  java
  • Ibatis DataSource configuration.

    <?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:util="http://www.springframework.org/schema/util"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd"
        default-autowire="byName">
    
        <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
            <property name="ignoreUnresolvablePlaceholders" value="true" />
            <property name="locations">
                <list>
                    <value>classpath*:jdbc.properties</value>
                </list>
            </property>
        </bean>
        
        <bean id="order-dataSource" class="org.apache.commons.dbcp.BasicDataSource"       
                destroy-method="close">       
            <property name="driverClassName" value="${jdbc.driver}" />      
            <property name="url" value="${jdbc.url.order-master}" />      
            <property name="username" value="${jdbc.username.order}" />      
            <property name="password" value="${jdbc.password.order}" />      
        </bean>  
    
        <bean id="order-sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
            <property name="configLocation" value="classpath:ibatis/order-sqlmap-config.xml" />
            <property name="dataSource" ref="order-dataSource" />
        </bean>
    
    </beans>
  • 相关阅读:
    mybatis概述
    Spring的配置分别是xml和java style
    JavaScript对象数据过滤、修改
    Spring框架
    设计模式-工厂方法模式(Fatory Patterm)
    简单的数据结构
    java链式操作
    centos7 php开发环境安装-composer
    centos7 php开发环境安装-php
    centos7 php开发环境安装-Apache
  • 原文地址:https://www.cnblogs.com/zhonghan/p/3464864.html
Copyright © 2011-2022 走看看