spring-framework / org.springframework.aop.framework / DefaultAopProxyFactory

DefaultAopProxyFactory

open class DefaultAopProxyFactory : AopProxyFactory, Serializable

Default AopProxyFactory implementation, creating either a CGLIB proxy or a JDK dynamic proxy.

Creates a CGLIB proxy if one the following is true for a given AdvisedSupport instance:

In general, specify proxyTargetClass to enforce a CGLIB proxy, or specify one or more interfaces to use a JDK dynamic proxy.

Author
Rod Johnson

Author
Juergen Hoeller

Since
12.03.2004

See Also
AdvisedSupport#setOptimizeAdvisedSupport#setProxyTargetClassAdvisedSupport#setInterfaces

Constructors

<init>

DefaultAopProxyFactory()

Default AopProxyFactory implementation, creating either a CGLIB proxy or a JDK dynamic proxy.

Creates a CGLIB proxy if one the following is true for a given AdvisedSupport instance:

  • the optimize flag is set
  • the proxyTargetClass flag is set
  • no proxy interfaces have been specified

In general, specify proxyTargetClass to enforce a CGLIB proxy, or specify one or more interfaces to use a JDK dynamic proxy.

Functions

createAopProxy

open fun createAopProxy(config: AdvisedSupport): AopProxy