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 ...
随机推荐
- IE10中KendoUI treeview 点击后出现虚线框的解决方案
在head中添加:<meta http-equiv="X-UA-Compatible" content="IE=edge"> 修改渲染模式即可.
- C语言基础第二次作业
PTA第一次作业 题目7-1 统计学生成绩 1.实验代码 #include<stdio.h> int main(void){ ,B=,C=,D=,E=,f; scanf("%d ...
- 在jsp中怎么使用Cookie?el表达式中获取cookie的问题
初学jsp,不清楚cookie的使用方法,希望高手指点一下! 一般来说有两种办法,在JSP中使用Java的嵌入脚本. 例如: 写入Cookie <html> <head>. ...
- 2018.10.08 NOIP模拟 序列(主席树)
传送门 T2防ak题? 其实也不是很难(考试时sb了). 直接变形一下求出区间长度在[l2,r2][l2,r2][l2,r2]之间,中位数≤l1−1\le l1-1≤l1−1的区间数,和区间长度在[l ...
- hdu-1698(线段树,区间修改)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1698 注意:用位运算会更快,不然超时. #include<iostream> #inclu ...
- 将Excel导入DataGridView 中的"select * from [Sheet1$]"中[ ]里面表单名的动态获取
Sheet1$是Excel默认的第一个表名,如果改动:select * from [Sheet1$]"将查询失败,因此应根据选择自动获取excel表名: OpenFileDialog ofd ...
- HDU1518 Square(DFS) 2016-07-24 15:08 49人阅读 评论(0) 收藏
Square Problem Description Given a set of sticks of various lengths, is it possible to join them end ...
- android图形系统概述
简介 本文讲解的内容是Android4.1以后的系统机制,将从整体上分析Android图形显示系统的结构,不深入分析每一层内部的代码实现,更多的是使用流程图和结构图来让大家理解Android是如何绘制 ...
- Android-系统解析AndroidManifest
在上一篇博客,Android-XML格式描述,介绍来XML在Android中的格式: Android-系统解析AndroidManifest,是分析Android系统是如何去解析AndroidMani ...
- laravel字段自增/自减
DB::table('users')->increment('votes');DB::table('users')->increment('votes', 5);DB::table('us ...