一、异常信息:
java.lang.ClassCastException: com.sun.proxy.$Proxy44 cannot be cast to...
二、前提:ClassCastException When using @Transactional annotation
@Transactional(propagation = Propagation.NOT_SUPPORTED)
三、解决办法:
x:annotation标签设置属性proxy-target-class=true
<tx:annotation-driven proxy-target-class="true"/>
参考:
http://sonarqube.15.x6.nabble.com/ClassCastException-when-testcase-is-using-Spring-AOP-proxied-bean-td3202465.html