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 ...
随机推荐
- httpclient学习(原创)
--httpmime-4.2.5.jar 跟提交Form相关的类 这一块主要post数据的提交.每一条数据同name和content组成.content可能是字节数组或是流.提交这一类(MIME)的 ...
- Linux应用开发入门(转)
今天偶然看到这篇文章,做个入门了解还是不错的. 前一阵子在QQ上和朋友聊天的时候,总会看到有人说Linux上的应用程序开发是高手才可以完成的,而且这种“迷信”在目前似乎还很普遍.然而,情况并不是这样的 ...
- jquery报.live() is not a function的解决方法
jquery报.live() is not a function的解决方法: jquery中的live()方法在jquery1.9及以上的版本中已被废弃了,如果使用,会抛出TypeError: $(. ...
- Nios ii调试问题集
如果定义了一个类的.hpp,而在相应的.cpp中定义其中的函数时,根本找不到定义的类,这说明类在定义时出错,要注意类括号后的冒号. 2. 问题1:NiosII/Eclipse 中遇到“Launchin ...
- ArcGIS Desktop python Add-in 创建一个插件
1)创建一个项目 首先创建一个插件项目,本节介绍如何利用向导创建一个插件项目. 创建任何一个ArcGIS插件产品的过程都是一样的. 创建一个Python插件项目包括2个步骤: a) 选择一个插件项目文 ...
- web.xml 404 500 配置
web.xml <error-page> <error-code>404</error-code> <location>/error404.html&l ...
- Hdu1401 Solitaire 2017-01-18 17:21 33人阅读 评论(0) 收藏
Solitaire Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other) Total Sub ...
- KMP回顾学习
记住这张图,getnext就是对一个已知的待匹配的串进行分析,nex[i]表示当a[i]匹配失败后我能跳到哪里,继续尝试匹配,而不是每一次失败都从头再来,先来看看代码 const int maxn = ...
- [转载]HTML5游戏前端开发秘籍
http://isux.tencent.com/html5-game-development-cheats.html 转载至腾讯ISUX HTML5游戏前端开发秘籍 本文由米随随编写 QQ空间Andr ...
- 跨终端Web
1.终端vs设备 H5页面运行在同一设备的不同终端下. (1)Web浏览器. (2)微信.QQ浏览器. (3)移动App的Webview. (4)TV机顶盒. 2.跨终端的实现方式 (1)响应式 存在 ...