SSM整合中遇到的不能扫描注解的bug
我的开发环境为:
ubuntu14.04LTS 64bit;
Spring Tool Suite 3.5.0.RELEASE
Maven 3.2.3
SSM整合中遇到的不能扫描注解的bug
最终解决方法:更换spring版本
bug详情:
这几天一直在被这个bug虐。所有的配置文件我和类文件都检查了N遍了都没问题。可就是开启包扫描后就报bug,关掉报扫描就没bug了。
部分错误:
17:02:37,149 ERROR TestContextManager:315 - Caught exception while allowing TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener@7692d9cc] to prepare test instance [com.uujava.mbfy.test.TestMybatis@75f32542]
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:157)
经过排查最终将3.2.0.RELEASE更换为3.2.4.RELEASE问题解决。
<!-- spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.2.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>3.2.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>3.2.4.RELEASE</version>
</dependency>
<!-- <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>3.2.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>3.2.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.2.0.RELEASE</version>
</dependency> -->
SSM整合中遇到的不能扫描注解的bug的更多相关文章
- SSM整合中每一框架需要做的基本操作简述
1.dao层的工作 pojo和映射文件以及接口(使用逆向工程) SqlMapConfig.xml(Mybaits核心配置文件) ApplicationContext-dao.xml 整合后Sprin ...
- 总结在ssm整合中,Mybatis出现Mapped Statements collection already contains value for xxxxx的解决方案
先贴一段报错信息: 前面的都不是很重要,看最后灰色标注的那段.... 严重: 异常将上下文初始化事件发送到类的侦听器实例.[org.springframework.web.context.Contex ...
- SSM框架中出现的几种注解的理解
转自IT·达人原文 Spring5:@Autowired注解.@Resource注解和@Service注解,有删改. 传统的Spring做法是使用.xml文件来对bean进行注入或者是配置aop.事物 ...
- SSM整合中错误:Data truncation: Data too long for column 'gender' at row 1
错误描述 ### SQL: insert into t_customer(name,gender,phone,address) values (?,?,?,?) ### Cause: com.mysq ...
- 学习黑马教学视频SSM整合中Security遇到的问题org.springframework.security.access.AccessDeniedException: Access is denied
问题已解决. 总结: 报错:org.springframework.security.access.AccessDeniedException: Access is denied 当您遇到同样问题时, ...
- 在SSM框架中我设置拦截器filter不能通过注解获取到实现类
我在用注解注入实现类的时候,出现了这样的错误:如以下截图: 这个地方报出的错误是说明我的一个接口类型的类没有获取到,后来我就想要是我的实现类没有获取到那么我就直接new一个实现类然后再进行调用就会出现 ...
- Maven + 最新SSM整合
. 1. 开发环境搭建 参考博文:Eclipse4.6(Neon) + Tomcat8 + MAVEN3.3.9 + SVN项目完整环境搭建 2. Maven Web项目创建 2.1. 2.2. 2. ...
- ssm整合说明与模板-Spring Spring MVC Mybatis整合开发
ssm整合说明 spring+spring mvc+mybatis 说明 源码下载 由于之前存在ssh框架,spring+struts+hibernate,其中spring负责aop与ioc,所以一般 ...
- SSM整合---实现全部用户查询
SSM整合 准备 1.创建工程 2.导入必须jar包 链接: https://pan.baidu.com/s/1nvCDQJ3 密码: v5xs 3.工程结构 代码 SqlMapConfig < ...
随机推荐
- Oracle EBS-SQL (INV-7):检查接收中记录数.sql
select msi.segment1 物料编码, msi.description 物料描述, sum(rs.quantity) ...
- C#多显示器转换的两种方法——SetWindowPos,Screen
原文 http://blog.csdn.net/hejialin666/article/details/6057551 实现多屏显示目的:一般情况下是一个电脑显示屏,外接一个电视显示屏.在电脑上显示的 ...
- let区别(关于racket和r5rs)
R5RS is the Revised5 Report on the Algorithmic Language Scheme.参考http://www.schemers.org/Documents/S ...
- 20个Linux命令及Linux终端的趣事
20个Linux命令及Linux终端的趣事 . 命令:sl (蒸汽机车) 你可能了解 ‘ls’ 命令,并经常使用它来查看文件夹的内容.但是,有些时候你可能会拼写成 ‘sl’ ,这时我们应该如何获得一些 ...
- VC6使用技巧
1.检测程序中的括号是否匹配 把光标移动到需要检测的括号(如大括号{}.方括号[].圆括号()和尖括号<>)前面,键入快捷键“Ctrl+]”.如果括号匹配正确,光标就跳到匹配的括号处,否则 ...
- C based
switch(ch){case '\n': lines += 1; /*fail thru*/case ' ':case '\t': words += 1;default: c ...
- Qt widget--杭州小笼包
1,QPainter::scale(double,double);第一个参数水培方向缩放 shear剪切 QPainter::rotate()旋转,旋转度数,rotate QPainter::tran ...
- ORACLE 表连接详解
在ORACLE中,表连接方式主要有:内连接,外连接,自连接: 内连接: 这是最常用的连接查询 SELECT * FROM A INNER JOIN B ON A.ID=B.ID SELECT * FR ...
- MTK Android4.0.3 ICS 添加缅甸语Myanmar
最近几个项目需要添加缅甸语,借助网络资源,同时结合自身实践,成功添加缅甸语,现分享经验如下. 一. 前期工作: 准备Myanmar字库,下载地址:http://www.myordbok.com/mya ...
- 用Teleport Ultra下载网站全部页面 爬虫
测试case,就是把Commons-FileUpload 的API下载来 上网查的时候我才发现这是一个由很多页面组成的网站,下载起来很麻烦. 怎么办呢?呵呵,一定是有办法的.Teleport ...