今天在spring配置文件中配置切面时,出现了以下错误:
java.lang.ClassCastException: com.sun.proxy.$Proxy11 cannot be cast to com.fresher.service.impl.AccountServiceImpl
at com.fresher.test.TestAOP.testAop(TestAOP.java:18)
错误解决方案:
在xml的配置文件的aop:config中添加属性proxy-target-class=“true”