How to crosscut annotated methods and constructors?

前端 未结 2 2031
野趣味
野趣味 2020-12-19 06:43

This is what I\'m doing:

@Aspect
public class MethodLogger {
  @Around(\"(execution(* *(..)) || initialization(*.new(..))) && @annotation(Foo)\")
  p         


        
2条回答
  •  北海茫月
    2020-12-19 07:10

    As workaround - you can introduce factory for such needs to apply around advice on its methods.

提交回复
热议问题