AOP中的环绕通知
作者:互联网
@Around("aspect()")
public void around(JoinPoint joinPoint){
//获取目标类
Object target = joinPoint.getTarget().getClass().getName();
System.out.println(target);
//获取调用方法中参数的值
Object [] args = joinPoint.getArgs();
for (Object obj:args){
System.out.println(obj);
}
//获取调用的方法名
Object methodName = joinPoint.getSignature();
System.out.println(methodName);
}
标签:Object,methodName,通知,joinPoint,System,AOP,println,环绕,out 来源: https://www.cnblogs.com/xmcode/p/15616699.html