proxy-target-class默认为false,改成true便可。 代理
<tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/> 接口
proxy-target-class属性值决定是基于接口的仍是基于类的代理被建立。若是proxy-target-class 属性值被设置为true,那么基于类的代理将起做用(这时须要cglib库)。若是proxy-target-class属值被设置为false或者这个属性被省略,那么标准的JDK 基于接口的代理将起做用。 get