SSH结合spring事务管理配置文件
来源:互联网 发布:loading windows files 编辑:程序博客网 时间:2024/05/29 04:26
applicationContext.xml文件
<?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: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-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"><!-- To provide a placeholder, mainly for database configuration --> <bean id="propertyConfigure" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>classpath:resource/properties/dbconfig.properties</value> </list> </property> </bean> <!--Database connection pool configuration --> <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> <property name="driverClass"> <value>${jdbc.driverClassName}</value> </property> <property name="jdbcUrl"> <value>${jdbc.url}</value> </property> <property name="user"> <value>${jdbc.username}</value> </property> <property name="password"> <value>${jdbc.password}</value> </property> </bean> <!-- Hibernate SessionFactory configuration --><bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="hibernateProperties"><props><prop key="hibernate.dialect">${hibernate.dialect}</prop><prop key="hibernate.show_sql">${hibernate.show_sql}</prop> <prop key="hibernate.cache.provider_class">${hibernate.cache.provider_class}</prop> <prop key="hibernate.cache.use_query_cache">${hibernate.cache.use_query_cache}</prop> <prop key="hibernate.jdbc.batch_size">50</prop><prop key="hibernate.connection.autocommit">true</prop> <!-- 下面这句是映射数据库字段clob为String --><prop key="hibernate.connection.SetBigStringTryClob">true</prop></props></property> <!-- 采用xml配置文件方式 --><property name="mappingResources"><list><value>com/*.hbm.xml</value></list></property><!-- 采用注解方式的model --><!--<property name="annotatedClasses"><list></list></property>--></bean><!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) --><bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"><property name="sessionFactory" ref="sessionFactory"></property></bean><tx:advice id="txAdvice" transaction-manager="transactionManager"><tx:attributes> <tx:method name="add*" propagation="REQUIRED" /> <tx:method name="save*" propagation="REQUIRED" /> <tx:method name="insert*" propagation="REQUIRED" /> <tx:method name="delete*" propagation="REQUIRED" /> <tx:method name="edit*" propagation="REQUIRED" /> <tx:method name="update*" propagation="REQUIRED" /> <tx:method name="monitor*" propagation="REQUIRED" /> <tx:method name="*" read-only="true"/> </tx:attributes> </tx:advice><!--transaction path config--><aop:config> <aop:pointcut id="allManagerMethod" expression="execution(* com.*.*.service.*.*(..))"/> <aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod"/> </aop:config> </beans>
- SSH结合spring事务管理配置文件
- hibernate结合spring事务管理
- spring+hibernate事务管理配置文件
- spring事务管理—配置文件
- SSH整合Spring事务管理
- 使用Spring配置文件实现事务管理
- 使用Spring配置文件实现事务管理
- SSH spring事务管理不回滚问题
- 15、Spring事务管理、SSH整合
- Spring结合hibernate配置文件
- Spring结合hibernate配置文件
- SSH中的spring配置文件
- SSH中的spring配置文件
- ssh事务处理spring配置文件
- spring mvc+hibernate 实现事务管理(配置文件版)
- spring mvc+hibernate 实现事务管理(配置文件版)
- 14-spring的事务管理(配置文件实现)
- SSH整合,spring事务管理不回滚问题
- 扩展方法
- 动态树模板 (陈首元ppt)
- 可视化通讯(以Anychat为例子)
- 限制一段时间内对button只能点按一次
- VB网络操作学习笔记
- SSH结合spring事务管理配置文件
- visio画UML用例图没有include关系的解决方法
- javascript学习系列03(分支判断与循环)
- 漫谈项目管理1——九子夺嫡1
- Java SE基础部分-05.数组与方法
- 基于ckeditor的在JSP中显示文本编辑页面
- 在Win8下无法拖动文件的解决办法
- Linux进程的表示
- 软件测试中的测试用例复用技术