简单 spring AOP 配置文件
来源:互联网 发布:电魂网络showgirl 编辑:程序博客网 时间:2024/05/22 00:35
配置文件两种:
1、
<aop:config><aop:pointcut id="ctrlOperation"expression="execution(* com.tuniu..*Controller.*(..))" /><aop:pointcut id="ctrlAPI" expression="execution(* com.tuniu..*API.*(..))" /><aop:advisor advice-ref="loginInfoAdvice" pointcut-ref="ctrlOperation" /><aop:advisor advice-ref="loginInfoAdvice" pointcut-ref="ctrlAPI" /><aop:advisor advice-ref="dataSourceAdvice" pointcut-ref="ctrlOperation" /></aop:config><bean id="dataSourceAdvice" class="com.tuniu.scc.stock.manage.common.db.DataSourceAdvice" /><bean id="loginInfoAdvice" class="com.tuniu.scc.stock.manage.common.login.CookieAdvice" />
2、
<aop:config> <aop:aspect id="TestAspect" ref="aspectBean"> <!--配置com.spring.service包下所有类或接口的所有方法--> <aop:pointcut id="businessService" expression="execution(* com.spring.service.*.*(..))" /> <aop:before pointcut-ref="businessService" method="doBefore"/> <aop:after pointcut-ref="businessService" method="doAfter"/> <aop:around pointcut-ref="businessService" method="doAround"/> <aop:after-throwing pointcut-ref="businessService" method="doThrowing" throwing="ex"/> </aop:aspect> </aop:config> <bean id="aspectBean" class="com.spring.aop.TestAspect" />
0 0
- 简单 spring AOP 配置文件
- Spring AOP 配置文件的简单理解
- spring aop配置文件
- spring配置文件配置aop
- Spring-AOP:基于配置文件方式的AOP
- Spring AOP(通过配置文件方式)
- Spring之AOP配置文件详解
- 使用Spring配置文件实现AOP
- 使用Spring配置文件实现AOP
- spring aop 配置文件 xml文件
- 使用spring配置文件实现AOP
- 使用Spring配置文件实现AOP
- 使用Spring配置文件实现AOP
- Spring AOP - 基于XML配置文件
- Spring AOP基础 配置文件方式
- spring aop 配置文件参数介绍
- spring-aop 配置文件方式实现
- Spring基础---配置文件、Ioc、AOP
- mybatis多条件的模糊查询解决方案
- 对团购网站网站目标的分析
- 浏览器模式与DOCTYPE
- Mp3播放器项目问题记录
- 黑马程序员----------java基础数据类型
- 简单 spring AOP 配置文件
- Android项目中如何正确的引入第三方jar包
- USACO Section 4.3 Letter Game
- Linux网络编程之ICMP洪水攻击代码实例
- 常见的压缩算法
- Node 出现 uncaughtException 之后的优雅退出方案 | Lost JavaScript
- 毒霸不经意的提醒,才发现Google非常厚道可靠……
- 01_09.常见文本样式
- HDOJ 1003 Max Sum