Class DefaultAopProxyFactory
- java.lang.Object
- org.springframework.aop.framework.DefaultAopProxyFactory
- All Implemented Interfaces:
Serializable,AopProxyFactory
public class DefaultAopProxyFactory extends Object implements AopProxyFactory, Serializable
DefaultAopProxyFactoryimplementation, creating either a CGLIB proxy or a JDK dynamic proxy.Creates a CGLIB proxy if one the following is true for a given
AdvisedSupportinstance:- the
optimizeflag is set - the
proxyTargetClassflag is set - no proxy interfaces have been specified
In general, specify
proxyTargetClassto enforce a CGLIB proxy, or specify one or more interfaces to use a JDK dynamic proxy.- Since:
- 12.03.2004
- Author:
- Rod Johnson, Juergen Hoeller
- See Also:
ProxyConfig.setOptimize(boolean),ProxyConfig.setProxyTargetClass(boolean),AdvisedSupport.setInterfaces(java.lang.Class<?>...), Serialized Form
Constructor Summary
Constructors Constructor Description DefaultAopProxyFactory()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AopProxycreateAopProxy(AdvisedSupport config)Create anAopProxyfor the given AOP configuration.
Constructor Detail
DefaultAopProxyFactory
public DefaultAopProxyFactory()
Method Detail
createAopProxy
public AopProxy createAopProxy(AdvisedSupport config) throws AopConfigException
Description copied from interface:AopProxyFactoryCreate anAopProxyfor the given AOP configuration.- Specified by:
createAopProxyin interfaceAopProxyFactory- Parameters:
config- the AOP configuration in the form of an AdvisedSupport object- Returns:
- the corresponding AOP proxy
- Throws:
AopConfigException- if the configuration is invalid