Spring AOP Pointcut syntax for AND, OR and NOT

前端 未结 3 2077
半阙折子戏
半阙折子戏 2021-02-12 13:31

I\'m having trouble with a pointcut definition in Spring (version 2.5.6). I\'m trying to intercept all method calls to a class, except for a given method (someMethod in the exam

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-12 14:04

    This should work (spring AOP reference):

    pointcut="execution(* x.y.z.ClassName.*(..))
              && !execution(* x.y.x.ClassName.someMethod(..))"
    

提交回复
热议问题