Cannot proxy target class because CGLIB2 is not available .Add CGLIB to the class path or specify proxy interfaces…..
报错:Cannot proxy target class because CGLIB2 is not available .Add CGLIB to the class path or specify proxy interfaces…..
问题原因:
Spring框架,如果类实现了接口,就使用JDK的动态代理生成代理对象,如果这个类没有实现任何接口,就使用CGLIB生成代理对象。
解决办法有两种:
方案一让类实现某个接口;
方案二导入CGLIB包;
cglib是一个开源项,一个强大的,高性能,高质量的Code生成类库,它可以在运行期扩展Java类与实现Java接口。
本工程用的spring3.0.7,导入cglib-3.1.jar
继续报错:
Initialization of bean failed; nested exception is java.lang.IncompatibleClassChangeError: net/sf/cglib/core/DebuggingClassWriter
换成cglib-2.3.jar
问题解决
Cannot proxy target class because CGLIB2 is not available .Add CGLIB to the class path or specify proxy interfaces…..的更多相关文章
- Cannot proxy target class because CGLIB2 is not available. Add CGLIB to the class path or specify proxy interfaces
问题解决:缺少jar包 cglib-2.1.3.jar
- Spring3.x错误---- Cannot proxy target class because CGLIB2 is not available. Add CGLIB to the class path or specify proxy interfaces.
Spring3.x错误: 解决方法: 缺少cglib的包, 下载地址: http://sourceforge.net/projects/cglib/files/latest/download?sour ...
- Jupyterhub Error 503: Proxy Target Missing
Jupyterhub Error 503: Proxy Target Missing 请求太频繁
- AOP和IOC的实现原理(用到的设计模式)
文章来源:http://blog.csdn.NET/longyulu/article/details/36174979 用过spring的朋友都知道spring的强大和高深,都觉得深不可测,其实当你真 ...
- spring源码分析(二)Aop
创建日期:2016.08.19 修改日期:2016.08.20-2016.08.21 交流QQ:992591601 参考资料:<spring源码深度解析>.<spring技术内幕&g ...
- spring aop源码实现分析
1. 先分析Advice before执行Cglib2AopProxy的intercept方法: /** * General purpose AOP callback. Used when the t ...
- spring源码 — 三、AOP代理生成
AOP代理生成 AOP就是面向切面编程,主要作用就是抽取公共代码,无侵入的增强现有类的功能.从一个简单的spring AOP配置开始: <?xml version="1.0" ...
- (转)springAOP解析-1
原文:http://hzbook.group.iteye.com/group/wiki/2261-Spring 3.1 Spring AOP概述 3.1.1 AOP概念回顾AOP是Aspect-O ...
- Spring学习(二)——Spring中的AOP的初步理解[转]
[前面的话] Spring对我太重要了,做个关于web相关的项目都要使用Spring,每次去看Spring相关的知识,总是感觉一知半解,没有很好的系统去学习一下,现在抽点时间学习一下Spring. ...
随机推荐
- HttpClient 之 发送Https请求
HttpClient包是一个优秀的Http请求的开源jar. 本文Http工具类的封装基于HttpClient,封装后的工具类支持Https请求. 但是由于项目的需要快速的实现,以下代码还可能会有点过 ...
- C#解惑:HashSet<T>类
原贴: https://blog.csdn.net/X_X_OO/article/details/52529548 https://www.cnblogs.com/refuge/p/9465466.h ...
- 关于Django中ORM数据库迁移的配置
Django中ORM数据库迁移配置 1,若想将模型转为mysql数据库中的表,需要在settings中配置: DATABASES = { 'default': { 'ENGINE': 'django. ...
- Matplotlib_key_point
Matplotlib官方入门教程: http://www.labri.fr/perso/nrougier/teaching/matplotlib/ 本文参考教程: http://codingpy.co ...
- 力扣——Next Permutation(下一个排列) python实现
题目描述: 中文: 实现获取下一个排列的函数,算法需要将给定数字序列重新排列成字典序中下一个更大的排列. 如果不存在下一个更大的排列,则将数字重新排列成最小的排列(即升序排列). 必须原地修改,只允许 ...
- eclipse maven install后查看报错信息
- 12.24 ES6浅谈--块级作用域,let
第一部分:ES6新增了块级作用域,let关键字用于声明变量,相较于var而言,let关键字不存在声明提前. 1.ES6真正的出现了块级作用域,使用双花括号括住并在其中用let声明变量,会存在暂时性死区 ...
- springDataRedis 依赖
<dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit ...
- 每天一个linux命令:file(11)
file file命令用来探测给定文件的类型.file命令对文件的检查分为文件系统.魔法幻数检查和语言检查3个过程. 格式 file [选项] [参数] 参数选项 参数 备注 -b 列出辨识结果时,不 ...
- Excel表格 函数
1.四则运算(加.减.乘.除).求和.平均.计数.最值. 2. 逻辑函数 (IF函数.NOT函数.等) 3.时间和日期 ( NOW 返回当前日期和时间.等) 4.数学与三角函数 5.文本 ( LOWE ...