I'm new to Spring AOP and I have a question. The Pointcut interface defines a getClassFilter() method, however, since I've been playing around with AOP in spring I noticed that you always specify a specific target for the Dynamic Proxy to weave your aspect into.
If this is the case, when will you ever use an implementation of the ClassFilter interface when you can declaratively state which Class you want to apply your aspect to within the beans xml file?
It seems that you must always declare a target object and slip a proxy in front of it in order to use AOP (ignoring cg-lib). I just can't see how the ClassFilter even has a chance to work when you specifically choose which class to sprinkle with advice in the configuration file.
Any help on this matter would be greatly appreciated.
Thanks!



Reply With Quote