I am seasoned Java programmer but new to AOP. After trying it with Spring, I have a question: Do I have to define interface for every class which I want to apply aspect? And does aspect only apply to public method?
If it is true, consider following scenario:
I have an aspect for Logging. Naturally, I want to apply it to a lot of classes. First, i want to log from a class without an interface. Second, it's not uncommon that user want to log from heavy-computing, but not public method.
Is there any good way to deal with this?
Thanks for the help!


Reply With Quote