Spring事务配置文件方式
2017-12-17 21:20
225 查看
<!-- 配置事务属性 --> <tx:advice id="txAdvice" transaction-manager="dataSourceTransactionManager"> <tx:attributes> <!-- 配置哪些方法使用哪些事务属性 --> <tx:method name="check" propagation="REQUIRED" isolation="DEFAULT" read-only="false" timeout="3"/> <tx:method name="buy" propagation="REQUIRES_NEW" isolation="READ_COMMITTED"/> <!-- 查询 --> <tx:method name="select*" read-only="true"/> <!-- 删除 --> <tx:method name="delete*" /> <!-- 修改 --> <tx:method name="update*"/> <!-- 增加 --> <tx:method name="insert*"/> <!-- 其他的方法 --> <tx:method name="*"/> </tx:attributes> </tx:advice> <!-- 配置事务属性与切入点的结合 --> <aop:config> <aop:pointcut expression="execution(* com.gk.java.service.*.*(..))" id="txPointCut"/> <aop:advisor advice-ref="txAdvice" pointcut-ref="txPointCut"/> </aop:config>
相关文章推荐
- spring的事务管理(配置文件方式和注解方式实现、转账环境搭建)
- spring学习(十)—事务管理(配置文件方式实现)
- spring 配置事务---配置文件方式
- Spring入门之事务管理【一】XML配置文件方式
- Spring配置声明式事务--xml配置文件方式
- Spring 配置文件中关于事务控制的3种方式
- [学习小结]Spring_通知的那些事和基于配置文件的方式来配置AOP
- Spring 声明式事务的配置方式(三)
- Spring-boot中读取config配置文件的两种方式
- Spring事务配置的五中方式
- spring框架学习(八)spring管理事务方式之注解配置
- Spring事务配置的五种方式和spring里面事务的传播属性和事务隔离级别
- springboot读取自己定义的配置文件的方式以及使用joda_time来处理时间日期
- Spring 基于xml配置方式的事务
- Spring中ClassPathXmlApplicationContext类的简单使用/在jar包中访问spring配置文件的方式
- 20.Spring学习笔记_基于配置文件的方式来配置 AOP(by尚硅谷_佟刚)
- Spring事务配置的五种方式
- Spring中使用XML文件的方式配置事务
- Spring4学习笔记-声明式事务(基于配置文件的方式)
- Spring事务配置的五种方式和spring里面事务的传播属性和事务隔离级别