Example usage for org.springframework.aop.framework JdkDynamicAopProxy JdkDynamicAopProxy

List of usage examples for org.springframework.aop.framework JdkDynamicAopProxy JdkDynamicAopProxy

Introduction

In this page you can find the example usage for org.springframework.aop.framework JdkDynamicAopProxy JdkDynamicAopProxy.

Prototype

public JdkDynamicAopProxy(AdvisedSupport config) throws AopConfigException 

Source Link

Document

Construct a new JdkDynamicAopProxy for the given AOP configuration.

Usage

From source file:org.springframework.aop.framework.DefaultAopProxyFactory.java

public AopProxy createAopProxy(AdvisedSupport advisedSupport) throws AopConfigException {
    if (advisedSupport.isOptimize() || advisedSupport.isProxyTargetClass()
            || advisedSupport.getProxiedInterfaces().length == 0) {
        if (!cglibAvailable) {
            throw new AopConfigException("Cannot proxy target class because CGLIB2 is not available. "
                    + "Add CGLIB to the class path or specify proxy interfaces.");
        }/*from   w ww  .ja va2s. c om*/
        return CglibProxyFactory.createCglibProxy(advisedSupport);
    } else {
        return new JdkDynamicAopProxy(advisedSupport);
    }
}