19 lines
534 B
Java
19 lines
534 B
Java
|
package com.aop;
|
||
|
|
||
|
import org.aspectj.lang.ProceedingJoinPoint;
|
||
|
|
||
|
public class myAspect {
|
||
|
public void show1(){
|
||
|
System.out.println("前置增强。。。。");
|
||
|
}
|
||
|
public void show2(){
|
||
|
System.out.println("后置增强。。。。");
|
||
|
}
|
||
|
public Object show3(ProceedingJoinPoint pjp) throws Throwable {
|
||
|
System.out.println("环绕前增强。。。。");
|
||
|
Object proceed = pjp.proceed();//切点方法
|
||
|
System.out.println("环绕后增强。。。。");
|
||
|
return proceed;
|
||
|
}
|
||
|
}
|