Spring aop报错:com.sun.proxy.$Proxyxxx cannot be cast to yyy
来源:互联网 发布:vr转换软件 电脑 编辑:程序博客网 时间:2024/04/29 04:14
在使用Spring AOP时,遇到如下的错误:
java.lang.ClassCastException: com.sun.proxy.$Proxy11 cannot be cast to testcode.Volunteer
at testcode.aspectjTest.test1(aspectjTest.java:18)
有两个解决方法:
1、在aop:config标签上加上proxy-target-class=”true” <aop:config proxy-target-class="true"></aop:config>
2、使用<aop:aspectj-autoproxy proxy-target-class="true"/>
配置在spring xml
0 0
- Spring aop报错:com.sun.proxy.$Proxyxxx cannot be cast to yyy
- Spring aop报错:com.sun.proxy.$Proxyxxx cannot be cast to yyy
- Spring aop报错:com.sun.proxy.$Proxyxxx cannot be cast to yyy
- Spring报错:java.lang.ClassCastException: com.sun.proxy.$Proxy2 cannot be cast to *
- Spring——AOP com.sun.proxy.$Proxy7 cannot be cast to xxx
- Spring:com.sun.proxy.$proxy0 cannot be cast to XXX
- com.sun.proxy.$Proxy4 cannot be cast to spring.HelloService
- Spring com.sun.proxy.$Proxy6 cannot be cast to
- Spring:com.sun.proxy.$Proxy6 cannot be cast to
- hibernate-spring测试报错:com.sun.proxy.$Proxy44 cannot be cast to com.mm.service.imp.RoleServic
- Java动态代理 报 com.sun.proxy.$Proxy0 cannot be cast to ** 的错误
- com.sun.proxy.$Proxy29 cannot be cast to
- com.sun.proxy.$Proxy25 cannot be cast to SessionImplementor
- com.sun.proxy.$Proxy0 cannot be cast to ** 解决方法
- ssh报错java.lang.ClassCastException: com.sun.proxy.$Proxy6 cannot be cast to org.service.impl.EmpServi
- FAQ(22):java.lang.ClassCastException: com.sun.proxy.$Proxy7 cannot be cast to com.spring.Helloworld1
- java.lang.ClassCastException: com.sun.proxy.$Proxy* cannot be cast to***问题解决方案
- java.lang.ClassCastException: com.sun.proxy.$Proxy27 cannot be cast to com.bbk.n002.service.Question
- hrbust 哈理工oj 2181 无聊的小明【数位DP】
- 快速排序
- 二叉排序树的查询、插入和删除操作
- 利用百度接口
- STM32F0与STM32F1的GPIO是不同的分析
- Spring aop报错:com.sun.proxy.$Proxyxxx cannot be cast to yyy
- 23种设计模式:现代C++实现 V2.0
- android系统中间件移植-3G4G通信模块适配
- 模板模式
- leetcode 66: Plus One
- string类数组的输入
- android目录结构介绍(寒假学习1)
- 这一天到底是一年中的第几天
- MFC->整型、浮点型转字符串(Format函数)