1 报错描述

java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @BootstrapWith's 'value' attribute or make the default bootstrapper class available.

2分析原因

spring-webmvc的版本应该与spring-test的版本不一致

3解决

显示推荐内容

Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]的更多相关文章

  1. 解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level

    解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level 学习了:https://blog.csdn. ...

  2. Idea 的Test测试报错:java.lang.IllegalStateException: Failed to load ApplicationContext

    因为在Test里面使用了注解@Autowired 引入来至bean.xml文件的内容 ,而在Test没有没有办法自动引入,需要在Test类上加上注解 @ContextConfiguration(loc ...

  3. Spring Scheduled定时任务报错 java.lang.IllegalStateException: Encountered invalid @Scheduled method 'xxx': For input string: "2S"

    报错信息如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ding ...

  4. java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @BootstrapWith's 'value' attribute or make the default bootstrapper class available.

    1.前几天搭建单元测后,今天用其测试,结果报了这个问题.网上搜索后,刚开始以为原因是  Spring的 依赖版本的问题,我现在的依赖是: 因为其他的比如说 spring-content  spring ...

  5. MQ报错java.lang.IllegalStateException: Failed to load ApplicationContext

    这个问题是jdk版本造成的,把jdk1.8换成jdk1.7问题就解决了

  6. 云笔记项目- 上传文件报错"java.lang.IllegalStateException: File has been moved - cannot be read again"

    在做文件上传时,当写入上传的文件到文件时,会报错“java.lang.IllegalStateException: File has been moved - cannot be read again ...

  7. eclipse启动报错java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' befo

    报错: java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invo ...

  8. springboot测试启动报错java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test

    springboot测试启动报错: java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you ne ...

  9. spring mvc处理http请求报错:java.lang.IllegalStateException: getInputStream() has already been called for this request

    发送post请求到controller处理失败,报错日志如下: java.lang.IllegalStateException: getInputStream() has already been c ...

随机推荐

  1. Ubuntu 使用scrapy-splash

    配置docker 1.更新apt索引: $ sudo apt-get update 2.安装包允许apt通过HTTPS使用仓库:  sudo dpkg --configure -a  sudo apt ...

  2. 用python完成排序算法

    排序算法总结 冒泡排序 相邻两个元素,两两循环比较,每趟筛选出一个最大或者最小的元素(有序区在后面) def bubble_sort(data): # 第一层循环:循环一次,代表一趟,并筛选出一个最大 ...

  3. kafka安装和简单测试

    kafka安装和简单测试 # 安装zookeeper(apache-zookeeper-3.5.6-bin)https://archive.apache.org/dist/zookeeper/zook ...

  4. kylin2.4.1订单案例详细构建流程

    一.Hive订单数据仓库构建: hive表创建可以在命令行中直接完成,也可以在Hue中完成,本文在Hue中的完成,如下图: 下文的样例文本文件下载地址:https://files-cdn.cnblog ...

  5. pandas-17 关于nan的处理

    pandas-17 关于nan的处理 在pandas中有个另类的存在就是nan,解释是:not a number,不是一个数字,但是它的类型确是一个float类型.numpy中也存在关于nan的方法, ...

  6. elementUi vue el-radio 监听选中变化

    //change是radio-group标签的事件 <div> <el-radio-group v-model="radioSex" @change=" ...

  7. mysql-luster没有data目录

    mysqld --initialize-insecure --user=mysql 直接复制上面这条命令 然后cmd进入到 mysql解压出来bin的目录中: 等待一会  就发发现data的这个目录了 ...

  8. mybatis 批量添加数据的两种实现方式

    做开发的这几年期间经常遇到类似处理这种形式数据的问题,也遇到很多刚刚入行的新同学,发现他们做处理这块,经验不够,今天特地整理了一下,大家都会遇到的几种情况,代码也都粘贴出来了,拿去不谢,有时间大家还是 ...

  9. 简述-selenium对web实现自动化测试

    首先,我是基于python进行对selenium操作和使用的,主要分为selenium的实现原理和selenium的操作这两大部分的简单分享(由于本人水平有限,仅做基础的概述和总结): 一.selen ...

  10. Python 关于列表字典的键值修改

    list (修改列表的索引值) 循环一个列表时,最好不要对原列表有改变大小的操作,这样会影响你的最终结果. #使用负索引进行修改列表 print('First') lis = [11, 22, 33, ...