spring中事务管理
来源:互联网 发布:微信群一键加人软件 编辑:程序博客网 时间:2024/06/05 17:45
在spring中,事务管理的代码一般都是如下代码:
<!-- ================================事务相关控制================================================= -->
<bean name="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"/>
</bean>
<tx:advice id="userTxAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="delete*" propagation="REQUIRED" />
<tx:method name="save*" propagation="REQUIRED" />
<tx:method name="update*" propagation="REQUIRED" />
<tx:method name="find*" read-only="true" />
<tx:method name="get*" read-only="true" />
<tx:method name="select*" read-only="true" />
</tx:attributes>
</tx:advice>
<aop:config>
<!-- (..)表示任意参数类型-->
<aop:pointcut id="pc" expression="execution(* com.njupt.service.*.*(..))" />
<!--把事务控制在Service层-->
<aop:advisor pointcut-ref="pc" advice-ref="userTxAdvice" />
</aop:config>
- Spring 中事务管理
- Spring 中事务管理
- Spring中事务管理浅谈
- Spring中事务管理
- spring中事务管理
- Spring+mybatis中事务管理
- spring中事务管理
- Spring中事务管理
- Spring中事务管理的几种配法
- Spring中声明式事务管理
- 事务管理之Spring事务管理
- spring中JDBC 声明式事务管理
- spring中JDBC 声明式事务管理
- Spring中JDBC声明式事务管理
- Spring事务管理中@Transactional的参数配置
- 在Spring中使用JTA事务管理
- Spring事务管理中@Transactional的propagation参数
- 在Spring中使用JTA事务管理
- HDU 2444 The Accomodation of Students (二分图的最大匹配)
- 栈的经典应用
- C++ STL MAP 使用方法与应用介绍(三)
- HDU 2602
- 取石子——解题报告
- spring中事务管理
- AndroidManifest.xml文件详解(supports-screens)
- 使用spring整合mybatis时映射文件的导入方法
- Uva 10397 - Connect the Campus
- linux下ioctl函数学习
- mex use the openMP
- 关于const
- 使用spring整合mybatis时,sqlMapConfig.xml的分析
- 花朵数