java - Spring AOP, applying protected/private advice -
I'm playing with the Spring App: config XML configuration when I made the advice method a safe / private method , So I expected that I would get a run time exception. However the advice method was executed correctly. Does this mean that the Spring Advice system is amending the access permit, or is there something else going on here? To clarify:
Public square fu {public void foo () {} Advised method} Public class bar {Private zero bar () {} // Advice method, this example Both FU and Bar classes are in different packages.
When processing a consultation, the spring process will be done through each annotated class reflection, and your class Does not call out directly, so the visibility privileges of your advice are not relevant.
Unknowingly, there is no exact documentation that how the spring works so deeply, you have to help dig into the source code. It is understandable that the goal of the document of open-source project is not to explain the interior, but rather how to use the features that provide the project.
If you really want to look inside, the documentation tells you that AOP is applicable through BinfrintyProProcessors, and then you may wish to see Jawadok:
Comments
Post a Comment