Spring08---AOP_基于xml
来源:互联网 发布:视频教程网站源码 编辑:程序博客网 时间:2024/06/05 18:08
Aspect 类,
package com.chb.Spring.proxy;import org.aspectj.lang.JoinPoint;import org.aspectj.lang.ProceedingJoinPoint;import org.aspectj.lang.annotation.Around;import org.aspectj.lang.annotation.Aspect;import org.aspectj.lang.annotation.Before;import org.springframework.stereotype.Component;/** * 切面: 吧我们关注的点拿出来作为一个模块 */@Component("logAspect") //为Spring所管理public class LogAspect { public void logStart(JoinPoint jp) { //得到执行的对象, System.err.println(jp.getTarget()); //得到执行的方法 System.err.println(jp.getSignature().getName()); System.out.println("xml开始的时候加入日志"); } public void logAround(ProceedingJoinPoint pjp) { System.out.println("xmlAround开始加入日志"); try { pjp.proceed(); } catch (Throwable e) { e.printStackTrace(); }//执行程序 System.out.println("xmlAround 结束"); }}
设置xml
阅读全文
0 0
- Spring08---AOP_基于xml
- Spring学习(四)AOP_基于xml
- Spring07---AOP_基于annotation
- AOP_切面声明(XML+注解)
- AOP_面向切面编程
- Spring Aop_动态代理Demo
- Spring Aop_注解和配置实现
- 基于web.xml详解
- MyBatis基于XML配置
- 基于xml配置spring
- disconf基于XML实现
- 基于xml配置springmvc
- xml解析,基于XmlPullParser
- 基于xml的SpringMVC
- Spring - AOP基于XML
- 装配Bean基于XML
- spring基于xml定时器
- 基于XML实现AOP
- CodeForces 71 A.Way Too Long Words(水~)
- Bounding-box Regression
- 框架漫谈之hibernate(一)为什么要使用hibernate框架
- weex仿新闻
- Spark example WordCount
- Spring08---AOP_基于xml
- CMD 命令速查手册
- LeetCode
- 帮朋友建了个电子书分享网站
- PAT
- Linux基本入门学习
- python matplotlib简单示例
- XML中特殊字符的处理
- NVIC 的抢占中断和响应中断