zoukankan      html  css  js  c++  java
  • applicationContext-datasource.xml

    <?xml version="1.0" encoding="utf-8"?>
    <beans default-init-method="init" default-destroy-method="destroy"
        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:mongo="http://www.springframework.org/schema/data/mongo"
        xsi:schemaLocation="http://www.springframework.org/schema/beans 
                               http://www.springframework.org/schema/beans/spring-beans.xsd 
                               http://www.springframework.org/schema/context 
                               http://www.springframework.org/schema/context/spring-context.xsd
                               http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd
                               ">
           
           <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
            <property name="locations" value="classpath:database.properties"/>
        </bean>
        
        <!-- jndi --> 
        <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> 
            <property name="jndiName"> 
                <value>wms</value> 
            </property>
            <property name="resourceRef"> 
                <value>false</value> 
            </property>
        </bean>
        
        <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
            <property name="dataSource" ref="dataSource"></property>
        </bean>
        
        <bean id="namedParameterJdbcTemplate" class="org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate">
            <constructor-arg name="classicJdbcTemplate">
                <ref bean="jdbcTemplate"/>
            </constructor-arg>
        </bean>
        
    </beans>
  • 相关阅读:
    实用硬件篇(一)
    iOS通讯录(纯纯的干货)
    iOS社会化分享(干货)
    静态库的打包及使用(干货)
    iOS地图集成示例:百度地图POI检索
    iOS开发之KVC全解
    网络干货
    输入一个字符串,按字典序打印出该字符串中字符的所有排列(剑指offer)
    序列化二叉树
    二叉树中和为某一值的路径
  • 原文地址:https://www.cnblogs.com/tonggc1668/p/6547265.html
Copyright © 2011-2022 走看看