也就是说,给纯class设置代理,还离不开cglib?jdk为啥只支持接口不支持clas?
【 在 oldwatch (一条叫java的鱼◎城内风光独好) 的大作中提到: 】
: Spring AOP defaults to using standard JDK dynamic proxies for AOP proxies. This enables any interface (or set of interfaces) to be proxied.
:
: Spring AOP can also use CGLIB proxies. This is necessary to proxy classes rather than interfaces. By default, CGLIB is used if a business object does not implement an interface. As it is good practice to program to interfaces rather than classes, business classes normally implement one or more business interfaces. It is possible to force the use of CGLIB, in those (hopefully rare) cases where you need to advise a method that is not declared on an interface or where you need to pass a proxied object to a method as a concrete type.
:
--
FROM 1.202.22.*