【仅备忘用】spring的applicationContext.xml
来源:互联网 发布:mysql 缺省时间 编辑:程序博客网 时间:2024/06/02 01:58
<?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:mvc="http://www.springframework.org/schema/mvc" xmlns:p="http://www.springframework.org/schema/websocket" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:task="http://www.springframework.org/schema/task" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/websocket http://www.springframework.org/schema/websocket/spring-websocket.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd"> <!-- <context:component-scan base-package="cn.paic.rep.pare"> <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" /> </context:component-scan> --> <!-- jndi方式取数据库 --> <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="xds-pg" /> <property name="resourceRef" value="true" /> <property name="expectedType" value="javax.sql.DataSource" /> </bean> <!-- classpath of pro and test environment is ${tomcat_home}/config --> <bean id="configProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean"> <property name="locations"> <list> <value>classpath:relation.properties</value> <value>classpath:mail-config.properties</value> <value>classpath:admin.properties</value> </list> </property> </bean> <!-- 配置hibernate SessionFactory--> <bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="hibernateProperties"> <props> <prop key="hibernate.connection.driver_class">org.postgresql.Driver</prop> <prop key="hibernate.dialect"> org.hibernate.dialect.PostgreSQL81Dialect </prop> <prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQL82Dialect</prop> <prop key="hibernate.show_sql">true</prop> <prop key="hiberante.format_sql">true</prop> <prop key="hiberante.connection.autocommit">true</prop> <prop key="hibernate.temp.use_jdbc_metadata_defaults">false</prop> </props> </property> <property name="annotatedClasses"> <list> <value>a.b.c.XXX</value> </list> </property> </bean> <tx:annotation-driven transaction-manager="transactionManager"/> <!-- 事务管理器 --> <bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory"></property> </bean> <bean id="hibernateTemplate" class="org.springframework.orm.hibernate4.HibernateTemplate"> <property name="sessionFactory" ref="sessionFactory"></property> </bean></beans>
0 0
- 【仅备忘用】spring的applicationContext.xml
- spring 的 applicationcontext.xml
- Spring的applicationContext.xml
- spring 的 applicationcontext.xml
- Spring的applicationContext.xml
- spring的applicationContext.xml
- spring的applicationContext.xml
- Spring的配置文件,可以用applicationContext.xml+applicationContext.properties
- web.xml & Spring applicationContext.xml简单配置(备忘)
- Spring的配置文件applicationContext.xml
- Spring的配置文件applicationContext.xml
- Spring的applicationContext.xml文件
- 详解Spring的applicationContext.xml
- Spring的applicationContext.xml文件
- Spring的applicationContext.xml文件
- 详解Spring的applicationContext.xml
- Spring的applicationContext.xml文件
- spring-jms的applicationContext.xml
- Hibernate (五)一级缓存
- webstorm支持ES6语法设置
- java.util.concurrent.atomic详解
- AB两个人分配任务 在规定时间内 完成任务综合最多为多少
- Error:Execution failed for task ':app:mergeDebugResources'.
- 【仅备忘用】spring的applicationContext.xml
- 获取服务器日期
- 80端口被占用了怎么办
- 虚拟机类加载机制(七)
- JDBC 简介
- 排序算法之冒泡排序(C/C++)
- ZooKeeper API
- go语言form表单提交以及后台如何接收并返回做一个简单的解释
- 编码问题