AOP切面编程applicationContext.xml的配置
来源:互联网 发布:军团要塞2 知乎 编辑:程序博客网 时间:2024/05/21 10:33
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<!-- 配置切面类 -->
<bean id="zhuangbeibean" class="com.gxa.bj.aspect.ZhuangBei"/>
<!-- 配置目标对象类 -->
<bean id="zhangsan" class="com.gxa.bj.service.ZhangSanRole"/>
<bean id="lisi" class="com.gxa.bj.service.LiSiRole"/>
<!-- 配置AOP增强 -->
<aop:config>
<aop:aspect id="zhuangbeiaspect" ref="zhuangbeibean">
<!-- 配置切入点,切入点要满足表达式 -->
<aop:pointcut expression="execution(* com.gxa.bj.service.*.*(..))" id="pointcut"/>
<!-- 要织入增强方法的匹配 -->
<aop:before method="before" pointcut-ref="pointcut"/>
<aop:around method="around" pointcut-ref="pointcut"/>
<aop:after method="after" pointcut-ref="pointcut"/>
</aop:aspect>
</aop:config>
</beans>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<!-- 配置切面类 -->
<bean id="zhuangbeibean" class="com.gxa.bj.aspect.ZhuangBei"/>
<!-- 配置目标对象类 -->
<bean id="zhangsan" class="com.gxa.bj.service.ZhangSanRole"/>
<bean id="lisi" class="com.gxa.bj.service.LiSiRole"/>
<!-- 配置AOP增强 -->
<aop:config>
<aop:aspect id="zhuangbeiaspect" ref="zhuangbeibean">
<!-- 配置切入点,切入点要满足表达式 -->
<aop:pointcut expression="execution(* com.gxa.bj.service.*.*(..))" id="pointcut"/>
<!-- 要织入增强方法的匹配 -->
<aop:before method="before" pointcut-ref="pointcut"/>
<aop:around method="around" pointcut-ref="pointcut"/>
<aop:after method="after" pointcut-ref="pointcut"/>
</aop:aspect>
</aop:config>
</beans>
0 0
- AOP切面编程applicationContext.xml的配置
- Spring3.0 学习-AOP面向切面编程_Spring AOP的XML配置模式
- 面向切面编程AOP的配置
- AOP面向切面编程配置
- 关于切面编程的xml配置
- AOP切面编程 的切面类
- AOP基础知识及AOP切面编程之注释方法、xml配置方法
- 关于spring的aop(切面编程)配置总结
- AOP-面向切面的编程
- 面向切面的AOP编程
- Spring的AOP切面编程
- Spring的AOP切面编程
- spring学习笔记8--使用spring进行面向切面的(AOP)编程(2)XML配置方式
- spring添加AOP切面-基于XML配置
- Spring aop切面实际应用 XML配置
- Spring aop切面实际应用 XML配置
- spring使用AOP如何配置ApplicationContext.xml
- applicationContext.xml的配置
- 动画Animations
- SGDClassifier和LR,SVM的区别
- 数据挖掘学习笔记-分类(1)
- ParseResult Exception:java.lang.IllegalStateException: Cannot add header view to list -- setAdapter
- js 函数报错“Uncaught: TypeError xxx is not a function”
- AOP切面编程applicationContext.xml的配置
- jquery插件封装:消息对话框
- RxJava学习笔记1--RxJava原理和简单实现
- leetcode No38. Count and Say
- 学习网站
- 在Linux下面实现QDbus通信机制服务对象注册失败
- 卷1 入门CString与字符编码
- python中的reduce函数
- PHP代码中文输出乱码和转码问题