SpringAOP-advice通知参数获取教程(四)
通知参数获取教程
方式一:JoinPoint的方法
public void before(JoinPoint jp){
//通过JoinPoint参数获取调用原始方法所携带的参数
Object[] args = jp.getArgs();
System.out.println("before..."+args[0]);
}
方法二:配置文件
<aop:before
method="before1"
原创
2021-04-27 22:03:42 ·
127 阅读 ·
0 评论