使用spring遇到"BeanNotOfRequiredTypeException......but was actually of type [com.sun.proxy.$Proxy18]"异常
来源:互联网 发布:淘客营销软件 编辑:程序博客网 时间:2024/05/23 19:14
问题描述:
在使用aspectJ申明事务管理时出现的异常
org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'accountServiceImpl' must be of type [com.cc.spring.demo4.AccountServiceImpl],but was actually of type [com.sun.proxy.$Proxy18]
解决方法:
出现该异常是由于使用了默认的jdk的自动动态代理,需要在<aop:aspectj-autoproxy中添加proxy-target-class="true" 如下:<aop:aspectj-autoproxy proxy-target-class="true"/> ,即表示使用AspectJ的支持。
0 0
- 使用spring遇到"BeanNotOfRequiredTypeException......but was actually of type [com.sun.proxy.$Proxy18]"异常
- 使用spring遇到"BeanNotOfRequiredTypeException......but was actually of type [com.sun.proxy.$Proxy18]"异常
- BeanNotOfRequiredTypeException 异常:but was actually of type 'com.sun.proxy.$Proxy17'
- Spring AOP事物异常 but was actually of type 'com.sun.proxy.$Proxy17
- BeanNotOfRequiredTypeException: Bean named "" must be of type [] but was actually of type [com.sun.p
- Bean named '*' must be of type [*], but was actually of type [com.sun.proxy.$Proxy34]
- is expected to be of type but was actually of type 'com.sun.proxy.$Proxy70'
- but was actually of type 'com.sun.proxy.$Proxy**'的两种解决方法
- ......but was actually of type [sun.proxy.$Proxy8]
- BeanNotOfRequiredTypeException: Bean named "" must be of type [] but was actually of type [com.su
- 解决must be of type [com.bysj.services.CompanyServiceImp], but was actually of type [com.sun.proxy.$Pr
- Bean named 'xxx' must be of type xxx , but was actually of type [com.sun.proxy.$Proxy189]
- Bean named 'testImpl' must be of type [lcw.serviceimpl.testImpl], but was actually of type [com.sun.
- Getting Spring Error “Bean named 'x' must be of type [y], but was actually of type [$Proxy]” in Jenk
- but was actually of type [$Proxy19]
- is expected to be of type 'org.com.ssh.hibernate.AOPService.EchoTest' but was actually of type 'com.
- Bean named 'deptDao' must be of type [com.zttech.sys.dao.IGroupDao], but was actually of type [com.s
- “Bean named XXX must be of type[XXX], but was actually of type[XXX]”
- HTML或JS代码原样输出的几种方法总结
- Mac tomcat启动报错Local host name unknown: java.net.UnknownHostException: bogon: bogon: nodena
- MFC 简单的加密解密 小程序
- QT::QColor
- Encodeing(三)
- 使用spring遇到"BeanNotOfRequiredTypeException......but was actually of type [com.sun.proxy.$Proxy18]"异常
- When You And I Were Young, Seven7
- 合并两个排序的链表(Java实现)
- LintCode 39 恢复旋转排序数组
- 关于java多线程
- 桥接模式
- leetcode 39 Combination Sum (回溯法)
- Series 和 DataFrame 中的sort_index 方法
- Deep Learning学习笔记(二)——BP反向传播算法及其在CNN中的计算