Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
自从我编写 AspectJ 切入点以来已经有几年了,但我认为您缺少使用cflow切入点描述符。它需要一个参数,它本身就是切入点。当执行在传入的切入点的控制流 (cflow) 之下时,切入点解析为 true。
cflow
所以,你想做这样的事情:
pointcut daoCall() : call(* * DAO.*(..)) && cflow(within(ValidateService.validate()));
我可能有一些语法混乱。因此,请查看 cflow 上的文档,但以上是基本思想。