SSM整合中遇到的不能扫描注解的bug

时间:2023-01-12 09:04:02

我的开发环境为:

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的更多相关文章

  1. SSM整合中每一框架需要做的基本操作简述

    1.dao层的工作 pojo和映射文件以及接口(使用逆向工程) SqlMapConfig.xml(Mybaits核心配置文件) ApplicationContext-dao.xml  整合后Sprin ...

  2. 总结在ssm整合中,Mybatis出现Mapped Statements collection already contains value for xxxxx的解决方案

    先贴一段报错信息: 前面的都不是很重要,看最后灰色标注的那段.... 严重: 异常将上下文初始化事件发送到类的侦听器实例.[org.springframework.web.context.Contex ...

  3. SSM框架中出现的几种注解的理解

    转自IT·达人原文 Spring5:@Autowired注解.@Resource注解和@Service注解,有删改. 传统的Spring做法是使用.xml文件来对bean进行注入或者是配置aop.事物 ...

  4. SSM整合中错误:Data truncation&colon; Data too long for column &&num;39&semi;gender&&num;39&semi; at row 1

    错误描述 ### SQL: insert into t_customer(name,gender,phone,address) values (?,?,?,?) ### Cause: com.mysq ...

  5. 学习黑马教学视频SSM整合中Security遇到的问题org&period;springframework&period;security&period;access&period;AccessDeniedException&colon; Access is denied

    问题已解决. 总结: 报错:org.springframework.security.access.AccessDeniedException: Access is denied 当您遇到同样问题时, ...

  6. 在SSM框架中我设置拦截器filter不能通过注解获取到实现类

    我在用注解注入实现类的时候,出现了这样的错误:如以下截图: 这个地方报出的错误是说明我的一个接口类型的类没有获取到,后来我就想要是我的实现类没有获取到那么我就直接new一个实现类然后再进行调用就会出现 ...

  7. Maven &plus; 最新SSM整合

    . 1. 开发环境搭建 参考博文:Eclipse4.6(Neon) + Tomcat8 + MAVEN3.3.9 + SVN项目完整环境搭建 2. Maven Web项目创建 2.1. 2.2. 2. ...

  8. ssm整合说明与模板-Spring Spring MVC Mybatis整合开发

    ssm整合说明 spring+spring mvc+mybatis 说明 源码下载 由于之前存在ssh框架,spring+struts+hibernate,其中spring负责aop与ioc,所以一般 ...

  9. SSM整合---实现全部用户查询

    SSM整合 准备 1.创建工程 2.导入必须jar包 链接: https://pan.baidu.com/s/1nvCDQJ3 密码: v5xs 3.工程结构 代码 SqlMapConfig < ...

随机推荐

  1. 常用的Sql 函数

    常用的Sql 函数 1: replace 函数,替换字符. 语法 replace (original-string, search-string, replace-string ) 第一个参数你的字符 ...

  2. Maximum repetition substring 后缀数组

    Maximum repetition substring Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7578   Acc ...

  3. &lpar;function&lpar;&rpar;&lbrace;&rcub;&rpar;&lpar;jQuery&rpar;的功能和用途?

    1.为什么开发插件都这么写? 2.为什么要穿jQuery进去?在方法中直接用jquery的方法什么的不行吗? 1 首先(function(){})()这种写法 是创建了一个匿名的方法并立即执行(fun ...

  4. JAVA开发环境搭建 - Eclipse基本配置

    Eclipse设置的内容包括许多方面,不同的开发人员,不同的项目需要,可能对Eclipse的设置不尽相同.如下内容仅是对本人的一些基本设置做一些记录,以作备忘.后期会逐渐对相关内容进行更新,仅供参考. ...

  5. Java实现Html转PDF的方法

    写在前面 以下路径问题根据项目结构自己修改,以下是我使用spring boot打成jar包的写法. 一.需求背景 在前端编辑器中输入任意的文本,包括css样式变化,保存为html文本.通过Java后台 ...

  6. 关于getdate&lpar;&rpar;的不同的日期格式

    在使用Sql Server查询数据库时,我们经常会需要查询日期格式的数据,对于日期在sql语言中的格式有一定的要求,通过修改convert中的最后一位参数,可以返回不通格式的时间,具体实现如下: Se ...

  7. Images之base image

    Create a base image Most Dockerfiles start from a parent image. If you need to completely control th ...

  8. RTSP为什么VLC播放器无法播放

    rtsp_tracepoint: rtspservice.c,RTSP_state_machine, state_machine:current state is ready state curren ...

  9. bowtie&colon;短序列比对的新工具

    bowtie:短序列比对的新工具(转) (2014-11-17 22:15:24) 转载▼ 标签: 转载   原文地址:bowtie:短序列比对的新工具(转)作者:玉琪星兆 Bowtie是一个超级快速 ...

  10. 软件包管理&colon;rpm命令管理-校验和文件提取

    校验主要用于判断文件是否做了更改 修改标志: 会用-V,会看输出结果即可. 当有误操作,比如删了某一个文件,只需知道他属于哪一个rpm包,可用提取找回覆盖就行.并不把整个rpm包安装,而是提取其中的某 ...