Spring execution 表达式 @Pointcut

不念不忘少年蓝@ 2024-03-24 12:13 148阅读 0赞

@Pointcut(“execution(* com.ali.service..*Serviceimpl.export*(..))”)

..代表多个包,*Serviceimpl 代表任意service实现类,export* 代表export命名开头的方法,

  1. @Pointcut("execution(* com.ali.service..*Serviceimpl.export*(..))")
  2. public void excel(){}
  3. @Around("excel()")
  4. public Object doAround(ProceedingJoinPoint pjp)throws Throwable {
  5. //写处理方法
  6. }

https://www.cnblogs.com/satire/p/14874827.html

Spring execution 表达式 - 知乎 (zhihu.com)

发表评论

表情:
评论列表 (有 0 条评论,148人围观)

还没有评论,来说两句吧...

相关阅读

    相关 Spring AOP -- execution表达式

    :匹配任何数量字符; ..:匹配任何数量字符的重复,如在类型模式中匹配任何数量子包;而在方法参数模式中匹配任何数量参数。 +:匹配指定类型的子类型;仅能