I have a problem with Spring AOP which doesn't ties an aspect to all the methods it should (in my opinion) (see this question for more about the root problem: Spring AOP ignores some methods of Hessian Service).
How can I debug, what methods and instances get combined with what aspect? Is there something like a verbose flag for spring aop, which gives that information?
There seems not to be too much logging code in the Spring AOP classes, but...
In case Spring AOP decides to use Cglib to create proxy, there's one line which might help you:
// in org.springframework.aop.framework.Cglib2AopProxy.getProxy(ClassLoader)
if (logger.isDebugEnabled()) {
logger.debug("Creating CGLIB2 proxy: target source is " + this.advised.getTargetSource());
}
A similar one seems to come in handy when JDK proxies are used:
// in org.springframework.aop.framework.JdkDynamicAopProxy.getProxy(ClassLoader)
if (logger.isDebugEnabled()) {
logger.debug("Creating JDK dynamic proxy: target source is " + this.advised.getTargetSource());
}
Just try to turn on DEBUG-level logging for these two classes and see what's the output.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With