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

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -