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 ...
随机推荐
- [Eclipse]Eclipse里对XML进行注释的快捷键
eclipse中编辑java或C/C++文件时,注释的快捷键均为 "CTRL + / ",编辑xml文件时,该快捷键无效. eclipse 针对 XML 注释:CTRL + SHI ...
- Java数据结构和算法(一)树
Java数据结构和算法(一)树 数据结构与算法目录(https://www.cnblogs.com/binarylei/p/10115867.html) 前面讲到的链表.栈和队列都是一对一的线性结构, ...
- 07 Maven 使用Nexus创建私服
7. Maven 使用Nexus创建私服 私服不是 Maven 的核心概念,它仅仅是一种衍生出来的特殊的 Maven 仓库.通过建立自己的私服,就可以降低中央仓库负荷.节省外网带宽.加速 Maven ...
- html5移动开发。
禁止滚动 $('#idl').bind("touchmove",function(e){ e.preventDefault(); }); 图片居中 (因为图片比较特别,所以需要在外 ...
- jQuery Datepicker 插件遇到问题
Datepicker ver 1.7.3 浏览更多 常用设置 //禁用今天之前时间 $(".datePicker").datepicker('option', { minDate ...
- mysql实现分页的几种方式
mysql实现分页的几种方式: 第一种:使用框架自带的pageable来进行分页 package com.cellstrain.icell.repository.repositoryImpl; imp ...
- 2018.09.23 codeforces 1053B. Vasya and Good Sequences(前缀和)
传送门 考试的时候卡了一会儿. 显然这个答案只跟二进制位为1的数量有关. 还有一个显然的结论. 对于一个区间[l,r][l,r][l,r],如果其中单个数二进制位为1的数量最大值不到区间所有数二进制位 ...
- gj5 自定义序列类
5.1 序列类型的分类 容器序列 list.tuple.deque扁平序列[同一种数据类型] str.bytes.bytearray.array.array可变序列 list, deque,by ...
- HDU 2393 Higher Math (判断直角三角形)
题意:给定三个边,判断是不是直角三角形. 析:水题,勾股定理... 代码如下: #include <iostream> #include <cstdio> #include & ...
- Getting Started with Google Tango(Google Tango开始教程)
https://developers.google.com/tango/ Build apps that understand space and motion in high fidelity on ...