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>
  • 相关阅读:
    数据结构~线性表
    JQuery一行搞定当前面所对应的导航菜单变亮效果
    数据结构~二叉树
    MVC工作中的笔记~1(架构师是一步一步练成的)
    数据结构~链表
    java中文转拼音
    Bitmap旋转和缩放
    老师们都是这样计算毕业设计分数的
    Mysql ERROR 1040 (HY000): Too many connections
    统计没有使用绑定变量的sql语句
  • 原文地址:https://www.cnblogs.com/tonggc1668/p/6547265.html
Copyright © 2011-2022 走看看