简体   繁体   English

Spring AOP:确认CGLIB代理行为

[英]Spring AOP: confirming CGLIB proxy behaviour

While referring to 'Pro Spring 2.5', I came across the following statement (page 193): 在提到'Pro Spring 2.5'时,我遇到了以下声明(第193页):

For instance, the CGLIB proxy generates the appropriate bytecode to invoke any unadvised methods directly, dramatically reducing the overhead introduced by the proxy. 例如,CGLIB代理生成适当的字节码以直接调用任何未经修改的方法,从而大大减少代理引入的开销。

I have looked at the Spring source code and tried a few experiments, but could not confirm this statement. 我查看了Spring源代码并尝试了一些实验,但未能证实这一说法。 What simple program can I write to confirm it? 我可以用什么简单的程序来确认呢?

Use VisualVM and profile the code, or dump the bytecode using BCEL and look through the assembly. 使用VisualVM并分析代码,或使用BCEL转储字节码并查看程序集。 For the visualvm route, profile the code, take a snapshot, verifiy the method stack trace. 对于visualvm路由,分析代码,拍摄快照,验证方法堆栈跟踪。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM