至于 Spring 的 EL 解析,很明显它使用了 Reflection API。但是说到Spring的AOP部分,是不是用到了reflect.Proxy和reflect.InvokationHandler呢?似乎确实如此,因为原生 Spring 的 AOP 功能已缩小到方法操作。但我不确定。
问问题
1581 次
1 回答
3
是的,Spring 默认使用标准的基于 Java 接口的代理。它还支持基于 cglib 的代理以及完整的基于 AspectJ 的 AOP。
查看 Spring 参考:http ://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/aop.html#aop-introduction-proxies 。
有关实现细节,请查看 Github 上的 Spring 源代码:https ://github.com/spring-projects/spring-framework/tree/master/spring-aop
于 2013-09-18T06:01:12.593 回答