Spring AOP: confirming CGLIB proxy behavior

Turning to "Pro Spring 2.5" I came across the following statement (p. 193):

For example, the CGLIB proxy generates appropriate bytecode to refer to any unreasonable methods directly, dramatically reducing the overhead introduced by the proxy.

I looked at the Spring source code and tried a few experiments, but was unable to confirm this claim. What simple program can I write to validate it?


source to share

1 answer

Use VisualVM and profile your code, or flush the bytecode with BCEL and view the assembly. For visualvm route, profile the code, take a snapshot, check the method stack trace.



All Articles