i have multiple classes different packages extends class super. , want create aop pointcut around match methods in classes extends super. have tried this:
@around("within(com.mypackage.that.contains.super..*)") public void aroundallendpoints(proceedingjoinpoint joinpoint) throws throwable { logger.info("before proceed "); joinpoint.proceed(); logger.info("after proceed"); }
but doesn't work. suggestions?
the pointcut should be:
within(com.mypackage.super+)
where com.mypackage.super
qualified base class name , +
means "all subclasses". works spring aop. in aspectj match many joinpoints, not method executions. here pointcut works both spring aop , aspectj:
execution(* com.mypackage.super+.*(..))
Comments
Post a Comment