spring aop xml事务配置
<aop:config> <!-- 通过aop定义事务增强切面--><aop:pointcut id="serviceMethod" expression="execution(* cc.zeelan.app.service..*.*(..))" /> <!--事务增强--> <aop:advisor pointcut-ref="serviceMethod" advice-ref="txAdvice" /> </aop:config> <!--事务增强 --> <tx:advice id="txAdvice" transaction-manager="transactionManager"> <!-- 事务属性定义 --> <tx:attributes> <!-- 读取事务 --> <tx:method name="query*" propagation="SUPPORTS" read-only="true" timeout="600"/> <tx:method name="find*" propagation="SUPPORTS" read-only="true" timeout="600"/> <tx:method name="get*" propagation="SUPPORTS" read-only="true" timeout="600"/> <tx:method name="select*" propagation="SUPPORTS" read-only="true" timeout="600"/> <tx:method name="sum*" propagation="SUPPORTS" read-only="true" timeout="600"/> <!-- 操作事务 --> <tx:method name="add*" propagation="REQUIRED" read-only="false" rollback-for="Exception"/> <tx:method name="inse*" propagation="REQUIRED" read-only="false" rollback-for="Exception"/> <tx:method name="del*" propagation="REQUIRED" read-only="false" rollback-for="Exception"/> <tx:method name="update*" propagation="REQUIRED" read-only="false" rollback-for="Exception"/><tx:method name="edit*" propagation="REQUIRED" read-only="false" rollback-for="Exception"/><tx:method name="task*" propagation="REQUIRED" read-only="false" rollback-for="Exception"/></tx:attributes> </tx:advice>
转载于:https://www.cnblogs.com/light-zhang/p/8350034.html
spring aop xml事务配置相关推荐
- Spring 3.1 事务配置
版权声明:原创作品,谢绝转载!否则将追究法律责任. Spring 3.1 事务配置 spring发的包最好用的是2.5.6:所依赖的包全部都有,可是后来的版本都缺这少那的,导致开发中遇到各种各样的问题 ...
- Java框架篇---spring aop两种配置方式
Java框架篇---spring aop两种配置方式 第一种:注解配置AOP 注解配置AOP(使用 AspectJ 类库实现的),大致分为三步: 1. 使用注解@Aspect来定义一个切面,在切面中 ...
- Spring 4 xml 注解配置谅解 spring
2019独角兽企业重金招聘Python工程师标准>>> Spring 4 xml 注解配置谅解 博客分类: spring <Spring in Action>4th Ed ...
- Spring通过xml文件配置AOP,before、after、around、AfterThrowing、AfterReturning、Declare-parents
1 引包 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>sp ...
- Spring的xml文件配置方式实现AOP
配置文件与注解方式的有很大不同,多了很多配置项. beans2.xml <?xml version="1.0" encoding="UTF-8"?> ...
- spring中的事务配置
为什么80%的码农都做不了架构师?>>> 一 简介 spring中提供了三种事务管理的方法. 编程式事务管理 :亦即自己编写事务管理的代码,通过注入获取到spring中的事务管 ...
- spring tx:advice事务配置
http://www.cnblogs.com/rushoooooo/archive/2011/08/28/2155960.html 链接归纳的很详细 首先在/WEB-INF/applicationCo ...
- Spring声明式事务配置详解
事务管理是企业级应用程序开发中必备技术,用来确保数据的完整性和一致性.本文主要讲解事务涉及到一些概念以及spring中事务的使用.如有理解偏颇之处,恳请各位大神指正,小编不胜感激! 1.何为事务? ...
- Spring AOP XML配置及注解配置
一.XML配置切面类 1.日志切面类 //切面类注解配置加两个注解 @Aspect @Component public class LoggerAspect {public Object log(Pr ...
最新文章
- python实训第七天
- java子类有参构造函数吗_为什么我需要在这个Java通用子类中有一个构造函数?...
- SAP Fiori开发工具——Eclipse环境搭建
- 百度地图标点点击变色_《和平精英》版本爆料第三弹:雪地洞穴开启!组队标点功能升级~...
- JSP include指令和include动作的区别
- python 比赛成绩预测_利用 Python 预测英雄联盟胜负,分析了 5 万多场比赛才得出的数据!值得,涨知识了!...
- 读取图像矩阵维度必须一致_深度学习在放射治疗中的应用——工具篇(二)矩阵基本操作...
- centos7 安装 vsftpd 过程
- Gitee搭建自己的图床
- 如何让一个用户拥有root权限
- Elasticsearch Index Template(索引模板)
- iOS FMDB有返回结果集和无返回结果集
- html游戏脚本,网页游戏脚本软件道
- 记录点滴,善于分享-Microsoft Visio 2016下载与安装教程(全)
- Navicat安装教程
- jQuery灯箱插件lightBox使用方法
- QQ免费企业邮箱申请配置
- web前端面试题必备
- UIWebView 读取pdf,word,excel
- 微软笔记本怎么装linux,微软正在为XO笔记本装Win/Linux双系统
热门文章
- ibatis查询SQL语句返回一个对象,此对象包含一个List属性
- 把磁力下载站改为python系统
- ***CI中的数据库操作(insert_id新增后返回记录ID)
- 复分析可视化方法:笔记:log(z)的可视化微分法
- ORACLE分页查询SQL语法——最高效的分页
- VMware虚拟化技术培训(11) 小结
- 【队列源码研究】消息队列beanstalkd源码详解
- 1562. [NOI2009]变换序列【二分图】
- Oracle DBA课程系列笔记(19)
- springMVC 时间、js、html处理