Spring AOP config
来源:互联网 发布:仙界网络直播间好看吗 编辑:程序博客网 时间:2024/05/23 01:12
7 <!-- 事务通知 -->
8 <tx:advice id="txAdvice" transaction-manager="transactionManager">
9 <tx:attributes>
10 <tx:method name="add*" propagation="REQUIRED" rollback-for="Exception,SmoException,BmoException,DaoException" />
11 <tx:method name="del*" propagation="REQUIRED" rollback-for="Exception,SmoException,BmoException,DaoException" />
12 <tx:method name="upd*" propagation="REQUIRED" rollback-for="Exception,SmoException,BmoException,DaoException" />
13 <tx:method name="*" propagation="SUPPORTS" read-only="true" />
14 </tx:attributes>
15 </tx:advice>
16 <!-- Spring AOP config
17 解释一下(* com.evan.crm.service.*.*(..))中几个通配符的含义:
18 第一个 * —— 通配 任意返回值类型
19 第二个 * —— 通配 包com.evan.crm.service下的任意class
20 第三个 * —— 通配 包com.evan.crm.service下的任意class的任意方法
21 第四个 .. —— 通配 方法可以有0个或多个参数
25 <aop:advisor advice-ref="bluePrint.txAdvice" pointcut-ref="servicesPointcut" />
26 </aop:config>
8 <tx:advice id="txAdvice" transaction-manager="transactionManager">
9 <tx:attributes>
10 <tx:method name="add*" propagation="REQUIRED" rollback-for="Exception,SmoException,BmoException,DaoException" />
11 <tx:method name="del*" propagation="REQUIRED" rollback-for="Exception,SmoException,BmoException,DaoException" />
12 <tx:method name="upd*" propagation="REQUIRED" rollback-for="Exception,SmoException,BmoException,DaoException" />
13 <tx:method name="*" propagation="SUPPORTS" read-only="true" />
14 </tx:attributes>
15 </tx:advice>
16 <!-- Spring AOP config
17 解释一下(* com.evan.crm.service.*.*(..))中几个通配符的含义:
18 第一个 * —— 通配 任意返回值类型
19 第二个 * —— 通配 包com.evan.crm.service下的任意class
20 第三个 * —— 通配 包com.evan.crm.service下的任意class的任意方法
21 第四个 .. —— 通配 方法可以有0个或多个参数
22 -->
<!--那些类的哪些方法参与事务 expression一般注入service实现类的方法参与事务 -->
23 <aop:config>
<!--如果这里配置错了可能进行回滚,所以能看到sql语句,但是数据库是没数据的 -->
25 <aop:advisor advice-ref="bluePrint.txAdvice" pointcut-ref="servicesPointcut" />
26 </aop:config>
0 0
- Spring AOP Schema aop:config
- Spring AOP之aop:config
- Spring aop config
- Spring AOP config
- spring AOP中的<aop:config>配置
- Spring AOP Schema aop:config、tx:advice
- Spring AOP Schema aop:config、tx:advice
- [Spring aop 配置] <aop:config> Schema-based AOP support
- Spring三种切面 <aop:aspectj-autoproxy/><aop:config></aop:config> <aop:scoped-proxy/>
- spring 拦截器 MethodInterceptor 配置 config aop
- spring tx:advice ...aop:config配置事物
- spring 拦截器 MethodInterceptor 配置 config aop
- spring 拦截器 MethodInterceptor 配置 config aop
- <aop:config>
- Spring使用<aop:config>标签时,报The prefix "aop" for element "aop:config" is not bound
- spring tx:advice 和 aop:config 配置事务
- spring tx:advice 和 aop:config 配置事务
- spring tx:advice 和 aop:config 配置事务
- MYSQL用法(十三) MySQL中INSERT INTO SELECT 的使用详解
- VS2013 密钥 – 所有版本
- BW十日谈之传输(转载)
- ubuntu minicom无法输入问题
- 《鸟哥的Linux私房菜》读书笔记7——正确关机
- Spring AOP config
- POJ 2486 Apple Tree (树形dp 经典题)
- 无线认证
- Ubuntu 14.04 VirtualBox启动问题之解决
- 大小写转换
- 巧用ASP.net MVC3里的HandleErrorAttribute
- IOS开发arc工程中使用非arc文件
- 《IT职场人生》百度阅读图书出版
- 如何在Spring官网下载jar包