注意pointcut的入参的表达式名称
来源:互联网 发布:淘宝部分店铺无法使用 编辑:程序博客网 时间:2024/04/30 16:27
今天为了这个问题调了一上午
当package=beforeprocessor时,而我在ponitcut里使用另外一个包(习惯性动作 自己也忘记了)
package beforeprocessor;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
@Aspect
public class aspect {
@AfterReturning(pointcut="execution(* test.*.*(..))",returning="name")
public void log(Object name) {
System.out.println("获取目标方法返回值:"+name);
System.out.println("模拟记录日志功能");
}
}
但是程序出来是不会报错的,也不会提醒,只是这个@aftereturning没有效果
所以以后记住这个小问题
0 0
- 注意pointcut的入参的表达式名称
- Spring 框架中切入点 pointcut 表达式的常用写法
- @Pointcut的用法
- @Pointcut的用法
- @Pointcut的用法
- @Pointcut的用法
- Spring @Pointcut的用法
- @Pointcut的用法
- 切点pointcut的详解
- @Pointcut的用法
- label app名称与标题栏名称 需要注意的地方
- 正则表达式匹配入参为某个值的函数
- Pointcut表示式的编写
- spring2.0 -Pointcut的定义
- Spring的静态Pointcut切入点
- Linux显示登入系统的帐号名称和总人数
- Spring Aop(九)——基于正则表达式的Pointcut
- 浅入javascript正则表达式的规则.
- Android studio导入架包
- mysql-5.7.17-winx64.zip解压缩版安装配置完整过程
- python中的group,match
- 手把手教你玩转上传图片
- 使用Flask-Mail扩展发送邮件
- 注意pointcut的入参的表达式名称
- tomcat设置get方法中url的长度限制
- android 图片压缩算法
- R-FCN+ResNet-50 训练模型
- 如何正确自定义handler
- python下运行import sklearn.model_selection 出错ImportError: No module named model_selection解决方法
- java基础学习API之StringBuffer类 六-2
- PLSQL DDL Trigger save DDL history
- Android调试系列之开发者选项常用功能