异常:org.springframework.beans.factory.BeanNotOfRequiredTypeException
来源:互联网 发布:上海有mac专柜吗 编辑:程序博客网 时间:2024/04/28 20:20
org.springframework.beans.factory.BeanNotOfRequiredTypeException 使用spring的AOP切面动态代理时,报错
原因:动态代理时使用的是spring自己生成的代理类,而配置文件中使用的是接口
解决方法:在配置中加入 <aop:aspectj-autoproxy proxy-target-class="true"/>
proxy-target-class="true"的相关作用如下:
proxy-target-class属性值决定是基于接口的还是基于类的代理被创建。
如果proxy-target-class 属性值被设置为true,那么基于类的代理将起作用(这时需要cglib库)
如果proxy-target-class属值被设置为false或者这个属性被省略,那么标准的JDK 基于接口的代理将起作用
0 0
- 异常:org.springframework.beans.factory.BeanNotOfRequiredTypeException
- org.springframework.beans.factory.BeanNotOfRequiredTypeException
- org.springframework.beans.factory.BeanNotOfRequiredTypeException:
- org.springframework.beans.factory.BeanNotOfRequiredTypeException:
- org.springframework.beans.factory.BeanNotOfRequiredTypeException
- org.springframework.beans.factory.BeanNotOfRequiredTypeException 错误,
- 解决: org.springframework.beans.factory.BeanNotOfRequiredTypeException办法
- 解决: org.springframework.beans.factory.BeanNotOfRequiredTypeException办法
- 解决: org.springframework.beans.factory.BeanNotOfRequiredTypeException办法
- 解决: org.springframework.beans.factory.BeanNotOfRequiredTypeException办法
- Spring-org.springframework.beans.factory.BeanNotOfRequiredTypeException
- 解决: org.springframework.beans.factory.BeanNotOfRequiredTypeException
- org.springframework.beans.factory.BeanNotOfRequiredTypeException must be of type
- "org.springframework.beans.factory.BeanNotOfRequiredTypeException……" 错误解决方案
- 代理及注入之org.springframework.beans.factory.BeanNotOfRequiredTypeException
- 运用spring时出现org.springframework.beans.factory.BeanNotOfRequiredTypeException: 错误
- 异常处理 org.springframework.beans.factory.BeanCreationException
- 异常:org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor
- 题目
- 安装pyv8
- Saruman's Army 【辐射区间贪心】
- 算法训练 整数平均值
- 循环的优化
- 异常:org.springframework.beans.factory.BeanNotOfRequiredTypeException
- C语言中 scanf_s和 scanf 区别
- 动态规划C语言初学
- nginx编译安装与配置-配置篇
- 访问WEB-INF下的JSP
- 飞龙的安卓逆向系列教程
- 排序算法
- 【SQL】trucate、drop、delete 的区别
- 华为5c手机刷机