使用spring遇到"BeanNotOfRequiredTypeException......but was actually of type [com.sun.proxy.$Proxy18]"异常
来源:互联网 发布:淘宝九块九包邮怎么弄 编辑:程序博客网 时间:2024/05/18 18:02
问题描述:
在使用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]”
- 英文金曲大赛
- 在写ajax用encodeurlcomponent时出现问题
- Android 框架
- linux cat命令详解
- c++ primer plus
- 使用spring遇到"BeanNotOfRequiredTypeException......but was actually of type [com.sun.proxy.$Proxy18]"异常
- Hello World
- 一步一步使用Unity3d工具实现AR开发入门
- JavaScript中对象的深拷贝
- LeetCode406. Queue Reconstruction by Height
- LeetCode : Majority Element
- 名单真相
- spring的IOC
- Android 退出多Activity的application的方式