Hi, let me first greet anyone as this is my first post on this forum.
It is probably one of the most worn-out questions spring aop - the logging aspect.
I need to create logging aspect which will simply log input parameters of methods and optionally time of method execution really nothing else.
The primary aim is to avoid other developers need to change code of existing apps, so xml configured aspects seems as number one choice.
Now, I was checking out Spring 2.x and 3.x AOP API and as I've seen, if I use Spring 3 AOP annotation based aspects those will be
coupled with one particular application (package as I can't make pointcuts to be configurable as it is possible with xml configured aspects.
To me, if I want to package aspect classes in separate module and reuse it in different apps, the most viable solution is implementing
spring aop interfaces (MethodBeforeAdvice etc) and then simply add aspects/advices into app context configuration file,
where it could be configured with desired pointcuts.
Perhaps my findings are wrong, maybe there is some other, better, approach?
Any suggestion/info/advice is welcome and appreaciated.
Thanks in advance


Reply With Quote
