java - Is it possible to add some funtctionality for all classes by path in war? -


i'm looking aspectj (or else, if know way that) solution changing functionality methods satisfying pattern get*.

is possible classes in web-inf/classes entire deployable war archive without explicitly specifying class annotation or else, because in project have classes mark manually. it's totatlly unacceptable.

i need put line logger.applylogging(this.getclass()); @ beginning of methods.

you make aroundadvice getters in specific package.

to need 2 pointcuts - 1 methods in package, combined methods starting in package.

then code aroundadvice.

thats pseudo code:

@pointcut("within(com.xyz.someapp.trading..*)") public void thepackagepointcut()  @pointcut("execution(* get*(..))") public void allgetters()  @before("thepackagepointcut() && allgetters()") public void applyadvise(joinpoint jp) {     // log before invocation      // let pointcut execute method } 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -