crud/main/java/com/aop/myAspect.java

19 lines
534 B
Java
Raw Normal View History

2023-05-24 15:00:58 +00:00
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;
}
}