aspectj - Audit trough AOP all public methods of an annotated class -
there possibility audit trough aop(using spring aop, aspectj etc.) public methods of class annotated @service or @repository or ever annotation consider class level , not @ method level? want have this:
@pointcut(value = "execution(public * *(..))") public void anypublicmethod() {} @around("anypublicmethod() && @annotation(repository)") public object dologtime(proceedingjoinpoint joinpoint) throws throwable { //do }
the pointcut should be
execution(public * @my.package.repository *.*(..))
which implicitly same as
execution(public * (@my.package.repository *).*(..))
p.s.: pointcut question targets methods annotated @repository
, not want.
Comments
Post a Comment