Spring+Mybatis整合时 Failed to read candidate component class,Caused by:IllegalArgumentException
Spring+Mybatis整合时Caused by: java.lang.IllegalArgumentException错误
org.springframework.beans.factory.BeanDefinitionStoreException:
Failed to read candidate component class:
file [E:\workspace\spring_mybatis\bin\cn\gts\ssm\mapper\UserMapper.class];
nested exception is java.lang.IllegalArgumentException
org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.
findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:)
原因分析:
当然,spring的最低运行版本我没测过
ps:经过断点,发现在ClassReader(springcore.jar中的)类中出现了异常(读取:自动扫描mybatis的mapper代理接口类出错。)
spring3.2的源码包中没有该类,开发包中有该类的字节码。
这时候 问题来了 找了spring3..5的源码,在eclipse里面一个一个设置起来 最后发现下载的源码jar( org.springframework.asm-3.0..RELEASE.jar)竟然没有源码 全部是class 难道 我下载 错了? 又去折腾n久 发现 下的git源码还是jar源码 都是清一色没有asm源码 Spring基于ASM 2.2.3重新打包了spring-asm,包名变成org.springframework.asm.*,但是代码完全没有修改 将相应的类全部替换也可以正常运行 那么问题来了,是不是Spring是觉得把别人的代码放到自己项目里,感到不好意思,才不提供源代码的呢? 也许 只有他们自己才知道 顺便 吐槽下 spring 弄的下载方式实在太不人性了,现在基本只能git去官方下东西了
springcore源码中无asm
java.lang.IllegalArgumentException at org.springframework.asm.ClassReader.<init>(Unknown Source)
Spring+Mybatis整合时 Failed to read candidate component class,Caused by:IllegalArgumentException的更多相关文章
- spring3.2.0与mybatis3.2.7整合出错--Failed to read candidate component class--nested exception is java.lang.IllegalArgumentException
错误信息如下: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate com ...
- Spring + mybatis整合方案总结 结合实例应用
Spring + mybatis整合实例应用 项目结构图 (Spring3.0.2 +mybatis3.0.4) 方案一: 通过配置文件整合Spring和mybatis 应用数据库 -- --数据库 ...
- Springmvc+Spring+Mybatis整合开发(架构搭建)
Springmvc+Spring+Mybatis整合开发(架构搭建) 0.项目结构 Springmvc:web层 Spring:对象的容器 Mybatis:数据库持久化操作 1.导入所有需要的jar包 ...
- 3.springMVC+spring+Mybatis整合Demo(单表的增删该查,这里主要是贴代码,不多解释了)
前面给大家讲了整合的思路和整合的过程,在这里就不在提了,直接把springMVC+spring+Mybatis整合的实例代码(单表的增删改查)贴给大家: 首先是目录结构: 仔细看看这个目录结构:我不详 ...
- spring在扫描包中的注解类时出现Failed to read candidate component错误
出现:org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate componen ...
- SpringMVC+Spring+Mybatis整合
SpringMVC+Spring+Mybatis整合 导包 配置jdbc.properties.log4j.properties jdbc.driver=com.mysql.jdbc.Driver j ...
- SSM 即所谓的 Spring MVC + Spring + MyBatis 整合开发。
SSM 即所谓的 Spring MVC + Spring + MyBatis 整合开发.是目前企业开发比较流行的架构.代替了之前的SSH(Struts + Spring + Hibernate) 计划 ...
- spring 启动异常Failed to read candidate component class
Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: ...
- Failed to read candidate component class错误分析
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component c ...
随机推荐
- stl string 小练习
最近没啥可写的 这里写下做的STL小练习 作为记录 去除指定字符串中的空格 获取文件名并根据名字创建临时文件,以TMP后缀结尾,已经为TMP后缀结尾文件则创建以XXX后缀结尾文件 读取一行输入内容 ...
- /^\s+|\s+$/g 技术 内容
alert(" aa dd ".replace(/^\s+|\s+$/g,'')+"方式的"); //正则表达式解释:分成两部分,^\s+ 以空格开头,\s+$ ...
- Realtek 8192cu 支持 Android Hotspot 软ap
http://www.cnblogs.com/bpasser/archive/2011/10/15/2213483.html Android 2.2 开始增加了WiFi Hotspot,可将Andro ...
- [转]一个CMake编译问题的解决过程
问题的提出 公司的一个power-pc平台的产品,有个协议进行了修改,过程中出现了比较奇怪的情况.直接将修改后的动态库下载到设备上(原始设备是有文件系统和其他的依赖文件的,相当于部分更新应用),设备和 ...
- 全球晶圆代工厂哪家强?2016年Top30名单
1.台积电(TSMC) 总部:台湾 简介:世界上最大的独立半导体晶圆代工企业,与联华电子并称“晶圆双雄”. 主要客户:苹果,高通,联发科,华为海思 官网:http://www.tsmc.com/ 2. ...
- 对于Serializable id类型的数据的测试
今天编写了一个这样的例子,然后进行了Junit测试,但是发现类型总是不匹配,最后测出如下 public <T> void deleteEntry(Class<T> t, Ser ...
- SetFocus (GetDlgItem (hwnd, idFocus))函数的各参数的具体含义
Setfocus(HWMD hwnd):将窗口hwnd设置成获得焦点 GetDlgItem (hwnd, idFocus):此函数返回一个句柄 具体参数的含义: hwnd:包含该窗口标志位的对话框的句 ...
- svn服务器快速搭建及简单配置
http://www.360doc.com/content/11/0711/19/5131531_132950891.shtml 简介Svn已经不容质疑的成为了一款流行的代码控制工具,但是你是否还在为 ...
- Eclipse ADT 与VS 常用的快捷键 对比学习
注:以下说的类型于VS,是指:VS+Resharper的快捷键,我是采用了Resharper作为VS的快捷键. 导航 Ctrl+1 快速修复 (类似于VS的alt+enter) Ctrl+D: 删除当 ...
- 一起学习MVC(1)初步了解MVC
MVC 即模型视图控制器(Model View Controller) 利于团队开发.便于管理与维护.代码易读性强.未来的主流开发框架结构. 当然,缺点也显而易见,与传统开发框架相比有很大的不 ...