错误为:
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy5 implementing java.lang.Runnable,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [java.util.TimerTask]  for  property  ' timerTask ' : no matching editors or conversion strategy found
    at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:
231 )
    at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:
138 )
    at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:
386 )
     
42  more



< tx:annotation - driven transaction - manager = " txManager " />
更改为
< tx:annotation - driven transaction - manager = " txManager "  proxy - target - class = " true " />

表示proxy代理的是类而不是接口。


     <!--  Tranceaction  -->
    
< bean id = " txManager "
        
class = " org.springframework.jdbc.datasource.DataSourceTransactionManager " >
        
< property name = " dataSource " >
            
< ref local = " dataSource "   />
        
</ property >
    
</ bean >

错误为:

Caused by: org.springframework.aop.framework.AopConfigException: Cannot proxy target  class  because CGLIB2 is not available. Add CGLIB to the  class  path or specify proxy interfaces.
原因为:
缺少包:cglib-2.1.3.jar