Java 使用spring AOP时CGLib没有默认构造函数错误

Java 使用spring AOP时CGLib没有默认构造函数错误,java,spring,cglib,Java,Spring,Cglib,我试图使用AOP记录所有方法调用,同时输入和离开一个方法,在我的beans xml中使用下面的bean和AOP声明 <aop:config> <aop:pointcut id="componentAnnotatedClass" expression="execution(* com.test.*.*.*(..))" /> <aop:advisor advice-ref="loggingAdvisor" pointcut-ref="

我试图使用AOP记录所有方法调用,同时输入和离开一个方法,在我的beans xml中使用下面的bean和AOP声明

<aop:config>
        <aop:pointcut id="componentAnnotatedClass" expression="execution(* com.test.*.*.*(..))" />  
        <aop:advisor advice-ref="loggingAdvisor" pointcut-ref="componentAnnotatedClass"  />
    </aop:config>
    <bean id="loggingAdvisor"  class="org.springframework.aop.interceptor.CustomizableTraceInterceptor">
        <property name="enterMessage" value="Entering $[targetClassShortName].$[methodName]($[arguments])" />
        <property name="exitMessage" value="Leaving $[targetClassShortName].$[methodName](): $[returnValue], Total Execution Time : $[invocationTime]ms" />
    </bean> 
当我浏览这篇文章时,我知道cglib需要一个默认构造函数,但在我的应用程序中,我有一个参数化构造函数来注入我的数据源。我的数据访问器中不能有默认构造函数。有没有解决这个问题的办法。
注意:我正在使用spring3.2 vesion

您可以通过setter或autowire插入数据源吗?不,我无法自动连接数据源,因为我已经初始化了在dao构造函数中实现存储过程的类。。。在我的类中,我使用compile关键字进行编译。。。因此,在尝试使用DataSource编译时,我会得到一个空指针
    Caused by: org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [class com.test.dao.BCommonDataAccessor]: Common causes of this problem include using a final class or a non-visible class; nested exception is java.lang.IllegalArgumentException: Superclass has no null constructors but no arguments were given