execution(modifiers-pattern,ret-type-pattern,declaring-type-pattern,name-pattern(param-pattern),throws-pattern)

简化后:execution(ret-type-pattern,name-pattern(param-pattern))

  • modifiers-pattern:访问权限
  • ret-type-pattern:返回值类型
  • declaring-type-pattern:包名类名
  • name-pattern:方法名(参数)
  • throws-pattern:抛出异常类型

execution(public * *(..)):任意公共的方法。

execution(* set*(..))

  • *:任意返回值
  • set*(..):任意包下任意类中的以set开头的方法

execution(* com.xyz.service.impl.*.*(..))

  • *:任意返回值
  • com.xyz.service.impl.*.*(..):com.xyz.service.impl包下任意类中的任意方法

execution(* com.xyz.service..*.*(..))

  • *:任意返回值
  • com.xyz.service..*.*(..):com.xyz.service包及其任意子包下任意类中的任意方法

execution(* *..service.*.*(..))

  • *:任意返回值
  • *..service..(..):(不止一个包)下属子包为service包下任意类中的任意方法

execution(* *.service.*.*(..))

  • *:任意返回值
  • *.service.*.*(..):(只有一个包)下属子包为service包下任意类中的任意方法