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. ...
随机推荐
- MVC5使用SignalR进行双向通信 (1)
@a604572782 2015-08-10 09:01 字数 2133 阅读 1245 MVC5使用SignalR进行双向通信 (1) 配置SignalR 在NuGet中通过 install-pac ...
- 【学习总结】Python-3- 类型判断之 isinstance 和 type 的区别
菜鸟教程-Python3-基本数据类型 关于类型查询: type() 函数:可以用来查询变量所指的对象类型 用 isinstance()函数:判断是否是某个类型 两者的区别: type()不会认为子类 ...
- Web前端基础学习-2
盒子模型 在页面中,我们将所有的元素全部看做是一个盒子,页面布局就是将大大小小不同的盒子堆砌在一起,而一个盒子由以下几部分组成: padding:内边距,内容到边框的距离: margin:外边距,其他 ...
- sqlite3 C语言 API 函数
int sqlite3_open(char *path, sqlite3 **db): 功能:打开sqlite数据库 参数: path: 数据库文件路径 db: 指向sqlite句柄的指针 返回值 ...
- 【机器学习实验】scikit-learn的主要模块和基本使用
[机器学习实验]scikit-learn的主要模块和基本使用 引言 对于一些开始搞机器学习算法有害怕下手的小朋友,该如何快速入门,这让人挺挣扎的.在从事数据科学的人中,最常用的工具就是R和Python ...
- web storage 简单的网页留言版
html <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <ti ...
- fiddler 抓取手机http/https包
测试需求: 安装有 fiddler 的电脑台 博主fiddler 4: 手机系统不限制智能手机就行,能连接wifi即可: 首先在fiddler这边配置一下(请不要问我为什么没有汉化毕竟free) ...
- 【leetcode】923. 3Sum With Multiplicity
题目如下: Given an integer array A, and an integer target, return the number of tuples i, j, k such tha ...
- mysql 查询表的最大时间 的数据
SELECT * from (SELECT MAX(a.update_date) as q ,a.monitoring_point_id from biz_monitoring_point_recor ...
- Service系统服务(二):补充应用技巧、软连接与硬连接、man手册、zip备份、vim效率操作、自定义yum软件仓库、发布及测试yum仓库、编译安装软件包
一.补充应用技巧 目标: 本例要求掌握在运维中比较常用的一些扩展命令技巧的使用,完成下列小技巧操作: 1> 采用数值形式将目录/root的权限调整为 rwx------ 2> 将记录的 ...