Aspect表达式

  1. 需要的jar包:
    aspectjweaver-1.8.9
    链接:https://pan.baidu.com/s/1iXAgwABrQfAqy5BgXLNx-g
    提取码:c17n
  2. 参考文件:
    spring-framework-reference
    链接:https://pan.baidu.com/s/15RvVBBU1Qk3Cdnv4SHrMLQ
    提取码:bdlc
  3. 格式:

Aspect表达式
主要使用的是execution,
Aspect表达式

execution(再写其它内容)
括号里的内容:

  • public void *() 表示 所有无参的返回值类型是void的任意的public 方法
  • public * com.example.spring.aop.service.impl.Impl.(…))
    表示com.example.spring.aop.service.impl包下面,所有以Impl结尾的类中,所有public类型的方法。
  • public * com.example.spring.aop.service.impl.Impl.m(…))
    表示com.example.spring.aop.service.impl包下面,所有以Impl结尾的类中,所有public类型的以m开头的方法。
  • public * com.example…service.impl.Impl.m(…)
    表示com.example.service.impl包下面、
    com.example.(任意层级).service.impl包下面,
    所有以Impl结尾的类中,所有public类型的以m开头的方法
    .

相关文章:

  • 2021-08-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-03-04
  • 2022-12-23
  • 2021-07-30
  • 2022-01-06
  • 2021-07-24
  • 2022-12-23
相关资源
相似解决方案