ssh--applicationContext.xml
来源:互联网 发布:mac怎么截gif 编辑:程序博客网 时间:2024/06/06 08:44
<?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:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
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/aop
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd">
<!-- 配置c3p0 -->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
<property name="driverClass" value="com.mysql.jdbc.Driver"/>
<property name="jdbcUrl" value="jdbc:mysql:///ssh"/>
<property name="user" value="root"/>
<property name="password" value="root"/>
</bean>
<!-- 配置LocalSessionFactoryBean -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.format_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>cn/edu/hgu/bean/User.hbm.xml</value>
<value>cn/edu/hgu/bean/Customer.hbm.xml</value>
<value>cn/edu/hgu/bean/Dict.hbm.xml</value>
<value>cn/edu/hgu/bean/Linkman.hbm.xml</value>
<value>cn/edu/hgu/bean/SaleVisit.hbm.xml</value>
</list>
</property>
</bean>
<!-- 配置平台事务管理器 -->
<bean id="transactionManager" class="org.springframework.orm.hibernate5.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<!-- 开启事务注解 -->
<tx:annotation-driven transaction-manager="transactionManager"/>
<bean id="userAction" class="cn.edu.hgu.action.UserAction" scope="prototype">
<property name="userService" ref="userService"/>
</bean>
<bean id="userService" class="cn.edu.hgu.service.UserServiceImpl">
<property name="userDao" ref="userDao"/>
</bean>
<bean id="userDao" class="cn.edu.hgu.dao.UserDaoImpl">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="customerAction" class="cn.edu.hgu.action.CustomerAction" scope="prototype">
<property name="customerService" ref="customerService"/>
</bean>
<bean id="customerService" class="cn.edu.hgu.service.CustomerServiceImpl">
<property name="customerDao" ref="customerDao"/>
</bean>
<bean id="customerDao" class="cn.edu.hgu.dao.CustomerDaoImpl">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="dictAction" class="cn.edu.hgu.action.DictAction" scope="prototype">
<property name="dictService" ref="dictService"/>
</bean>
<bean id="dictService" class="cn.edu.hgu.service.DictServiceImpl">
<property name="dictDao" ref="dictDao"/>
</bean>
<bean id="dictDao" class="cn.edu.hgu.dao.DictDaoImpl">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="linkmanAction" class="cn.edu.hgu.action.LinkmanAction" scope="prototype">
<property name="linkmanService" ref="linkmanService"/>
</bean>
<bean id="linkmanService" class="cn.edu.hgu.service.LinkmanServiceImpl">
<property name="linkmanDao" ref="linkmanDao"/>
</bean>
<bean id="linkmanDao" class="cn.edu.hgu.dao.LinkmanDaoImpl">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="visitAction" class="cn.edu.hgu.action.VisitAction" scope="prototype">
<property name="saleVisitService" ref="saleVisitService"/>
</bean>
<bean id="saleVisitService" class="cn.edu.hgu.service.SaleVisitServiceImpl">
<property name="saleVisitDao" ref="saleVisitDao"/>
</bean>
<bean id="saleVisitDao" class="cn.edu.hgu.dao.SaleVisitDaoImpl">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
</beans>
<beans 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:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
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/aop
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd">
<!-- 配置c3p0 -->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
<property name="driverClass" value="com.mysql.jdbc.Driver"/>
<property name="jdbcUrl" value="jdbc:mysql:///ssh"/>
<property name="user" value="root"/>
<property name="password" value="root"/>
</bean>
<!-- 配置LocalSessionFactoryBean -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.format_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>cn/edu/hgu/bean/User.hbm.xml</value>
<value>cn/edu/hgu/bean/Customer.hbm.xml</value>
<value>cn/edu/hgu/bean/Dict.hbm.xml</value>
<value>cn/edu/hgu/bean/Linkman.hbm.xml</value>
<value>cn/edu/hgu/bean/SaleVisit.hbm.xml</value>
</list>
</property>
</bean>
<!-- 配置平台事务管理器 -->
<bean id="transactionManager" class="org.springframework.orm.hibernate5.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<!-- 开启事务注解 -->
<tx:annotation-driven transaction-manager="transactionManager"/>
<bean id="userAction" class="cn.edu.hgu.action.UserAction" scope="prototype">
<property name="userService" ref="userService"/>
</bean>
<bean id="userService" class="cn.edu.hgu.service.UserServiceImpl">
<property name="userDao" ref="userDao"/>
</bean>
<bean id="userDao" class="cn.edu.hgu.dao.UserDaoImpl">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="customerAction" class="cn.edu.hgu.action.CustomerAction" scope="prototype">
<property name="customerService" ref="customerService"/>
</bean>
<bean id="customerService" class="cn.edu.hgu.service.CustomerServiceImpl">
<property name="customerDao" ref="customerDao"/>
</bean>
<bean id="customerDao" class="cn.edu.hgu.dao.CustomerDaoImpl">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="dictAction" class="cn.edu.hgu.action.DictAction" scope="prototype">
<property name="dictService" ref="dictService"/>
</bean>
<bean id="dictService" class="cn.edu.hgu.service.DictServiceImpl">
<property name="dictDao" ref="dictDao"/>
</bean>
<bean id="dictDao" class="cn.edu.hgu.dao.DictDaoImpl">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="linkmanAction" class="cn.edu.hgu.action.LinkmanAction" scope="prototype">
<property name="linkmanService" ref="linkmanService"/>
</bean>
<bean id="linkmanService" class="cn.edu.hgu.service.LinkmanServiceImpl">
<property name="linkmanDao" ref="linkmanDao"/>
</bean>
<bean id="linkmanDao" class="cn.edu.hgu.dao.LinkmanDaoImpl">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="visitAction" class="cn.edu.hgu.action.VisitAction" scope="prototype">
<property name="saleVisitService" ref="saleVisitService"/>
</bean>
<bean id="saleVisitService" class="cn.edu.hgu.service.SaleVisitServiceImpl">
<property name="saleVisitDao" ref="saleVisitDao"/>
</bean>
<bean id="saleVisitDao" class="cn.edu.hgu.dao.SaleVisitDaoImpl">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
</beans>
阅读全文
0 0
- ssh-applicationContext-commons.xml
- ssh--applicationContext.xml
- ssh项目applicationContext.xml出错
- SSH applicationContext.xml import异常
- SSH配置文件之applicationContext.xml
- SSH - 基础篇 - applicationContext.xml
- SSH框架中applicationContext.xml理解
- SSH框架applicationContext.xml简单配置
- SSH整合applicationContext.xml配置文件(my project)
- ssh web.xml beans.xml applicationContext.xml struts.xml
- SSH整合配置applicationContext.xml/hibernate.cfg.xml/struts.xml
- SSH中 applicationcontext.xml与web.xml的配置
- 搭建SSH框架的时候的applicationContext.xml配置文件
- SSH读取applicationContext.xml配置文件测试hibernate方法
- SSH框架的applicationContext.xml详解(非Annotation)
- SSH或者SSM的applicationContext.xml的配置
- SSH框架中applicationContext.xml文件的配置
- applicationContext.xml
- IO,异常
- Windows延迟删除、重命名
- Maven tomcat插件debug项目时 ,出现source not found的解决办法
- HDOJ1001
- 基于Dubbo的分布式系统架构(二):搭建一个简单的分布式架构
- ssh--applicationContext.xml
- 图片通过javaCV转RTMP流
- Privilegelnterceptor
- sizeof特点
- Ngx中的红黑树描述
- ssh--struts.xml
- Eclipse快捷键大全
- HDOJ1096
- 文件读写通用工具类