spring aop order
来源:互联网 发布:three.js 添加热点 编辑:程序博客网 时间:2024/05/18 04:01
自己写了一个aop
想被包含在 事务中,刚开始以为 order越小越先执行,发现不是,我这里用的around的,需要事务嵌套在外面。
实际是,order越小,越在外围
<!-- order 的值越小,越在外围-->
<tx:annotation-driven transaction-manager="txManager" order="1" />
<aop:config >
<!-- 添加流程保存的切面方法 -->
<aop:pointcut expression="execution(* *..*ServiceImpl.save(..))||execution(* *..SZ*ServiceImpl.save(..))" id="flowSavePoint"/>
<!-- order 的值越小,越在外围-->
<aop:aspect ref="flowSaveAspect" order="2">
<aop:around method="aroundMethod" pointcut-ref="flowSavePoint"/>
</aop:aspect>
</aop:config>
<!-- 自动为spring容器中那些配置@aspectJ切面的bean创建代理,织入切面 -->
<aop:aspectj-autoproxy />
<!-- 使用annotation自动注入bean,并启动相关处理注解的进程 -->
<context:component-scan base-package="com.xxxx">
</context:component-scan>
参考url:http://www.iteye.com/topic/1047080
- spring aop order
- spring aop annotation execute order
- spring @order
- spring @order
- AOP、Spring的AOP
- AOP--Spring AOP
- Spring AOP 嵌套AOP
- spring AOP
- Spring AOP
- Spring AOP
- spring aop
- Spring AOP
- spring AOP
- spring aop
- Spring aop
- Spring-AOP
- Spring AOP
- spring aop
- 【LintCode】Insert Intervals 插入区间
- 《Spring技术内幕》学习笔记12——HibernateTemplate对Hibernate的封装
- 设置UITableViewCell背景色
- 最短路径问题(Dijkstra)
- 深搜专题初步-1003
- spring aop order
- Android基础:listview的item点击事件会使里面的Button也出现按压的效果
- Activity间返回结果实现特征说明
- Product of Array Except Self
- 《Spring技术内幕》学习笔记13——SqlMapClientTemplate对Ibatis的封装
- 谷歌访问助手(chrome版)安装方法
- Get/POST方法提交的长度限制
- xargs命令
- Android所有系统资源图标android.R.drawable查看