org.springframework.aop.framework

## 类 DefaultAopProxyFactory

- java.lang.Object
- - org.springframework.aop.framework.DefaultAopProxyFactory

- 所有已实现的接口:
    Serializable, AopProxyFactory

      public class DefaultAopProxyFactory
      extends Object
      implements 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:

  - 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.

  从以下版本开始:
    12.03.2004
  作者:
    Rod Johnson, Juergen Hoeller
  另请参阅:
    `ProxyConfig.setOptimize(boolean)`, `ProxyConfig.setProxyTargetClass(boolean)`, `AdvisedSupport.setInterfaces(java.lang.Class<?>...)`, 序列化表格

- - ### 构造器概要

    构造器
    构造器和说明
    `DefaultAopProxyFactory()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `AopProxy` | `createAopProxy(AdvisedSupport config)` Create an `AopProxy` for the given AOP configuration.

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### DefaultAopProxyFactory

          public DefaultAopProxyFactory()

  - ### 方法详细资料

    - #### createAopProxy

          public AopProxy createAopProxy(AdvisedSupport config)
                                  throws AopConfigException

      从接口复制的说明: `AopProxyFactory`
      Create an `AopProxy` for the given AOP configuration.
      指定者:
        `createAopProxy` 在接口中 `AopProxyFactory`
      参数:
        `config` - 用来为我们指定我们advisor信息 该方法用来创建我们的代理对象 所我们的targetClass对象实现了接口，且 ProxyTargetClass 没有指定强制的走cglib代理,那么就是创建jdk代理 我们代理的类没有实现接口，那么会直接走cglib代理 若我们 ProxyTargetClass 指定为false 且代理类是接口才会走jdk代理 否在我们还是cglib代理
      返回:
      抛出:
        `AopConfigException`