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 -aop 等都是4.0.2 的,而且是之前已经配置好的,所以改为4.0.2;
2,改完之后让然报错,发现是 自己的test文件夹下面没有resource目录,原来
@ContextConfiguration(locations={"classpath:spring/application.xml"})指的是test下的的 resource目录 ,复制一份main文件夹的,启动成功!
java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @BootstrapWith's 'value' attribute or make the default bootstrapper class available.的更多相关文章
- Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]
1 报错描述 java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @Boot ...
- junit测试时,出现java.lang.IllegalStateException: Failed to load ApplicationContext
课程设计要求进行junit测试,我是在已经做好的ssh项目上做的测试,测试类代码如下 package com.zhang.web.services; import static org.junit.A ...
- java.lang.IllegalStateException: Failed to load property source from location 'classpath:/application-dev.yml'
如果你的项目没有配置错误,配置文件名称也正常,还出现这个问题,那一定是你的yml文件编码的问题 先附上一张项目架构图 当我启动服务器寻找配置文件的时候,服务器提示这样的错误信息 java.lang.I ...
- Idea 的Test测试报错:java.lang.IllegalStateException: Failed to load ApplicationContext
因为在Test里面使用了注解@Autowired 引入来至bean.xml文件的内容 ,而在Test没有没有办法自动引入,需要在Test类上加上注解 @ContextConfiguration(loc ...
- java.lang.IllegalStateException: Failed to load ApplicationContext
1.错误描述 七月 13, 2014 6:34:41 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBean ...
- 集成JUnit测试错误java.lang.IllegalStateException: Failed to load ApplicationContext
1 详细错误信息 java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.t ...
- maven单元测试报java.lang.IllegalStateException: Failed to load ApplicationContext
报这个异常java.lang.IllegalStateException: Failed to load ApplicationContext的时候,通常是因为applicationContent.x ...
- Spring3.x 版本和 JDK1.8 不兼容导致 java.lang.IllegalStateException: Failed to load ApplicationContext
由于安装了 JDK1.8 的版本,最近在进行整合 Struts2+Spring+Hibernate 框架的时候,不小心导入了之前下载的 Spring 3.2.0 版本的 jar 包. 结果在运行测试用 ...
- java.lang.IllegalStateException: Failed to load ApplicationContext selenium 异常 解决
WARN <init>, HHH000409: Using org.hibernate.id.UUIDHexGenerator which does not generate IETF R ...
随机推荐
- 命令行下class redis not found 解决
1.在命令行下输入 php --ini 2.在浏览器中查看 phpinfo() 可以看出,我 的phpinfo和命令行的就不是一个php.ini文件.因为我有几个版本的php , 并且在环境变量中配 ...
- 描边shader(法线外拓)
描边的思路是需要两个pass.第一个pass让顶点沿着法线方向延伸出去,使得模型变大一圈.第二个pass正常渲染,让正常渲染的模型挡在第一个pass之上,这样就会露出延伸出去的部分,延伸出去的就是我们 ...
- 使用Redis实现锁(支持分布式应用)(整理网络资料)
使用Redis实现锁(支持分布式应用) 1. 简介 使用Redis指令setnx.expire.getset等操作实现互斥资源的访问 本文内容来着网络整理,参考: http://www.linu ...
- selenium+Python(cookie处理)
cookie 处理本节重点: driver.get_cookies() 获得 cookie 信息 add_cookie(cookie_dict) 向 cookie 添加会话信息 delete_cook ...
- PHP发送返回404状态码
1. 默认的由Apache自动处理的404 修改Aache的配置文件 httpd.conf 中的 ErrorDocument 404 /404.html 或者使用 .htaccess文件,同时有要把 ...
- 从websphere6.1迁移到weblogic10.3的问题总结--转
http://blog.itpub.net/9399028/viewspace-692974/ 以前用weblogic低版本的时候,感觉挺容易的,也没什么要注意的,这次真正把应用从websphere迁 ...
- Selenium库简介
Selenium是一个自动化测试工具,利用它可以驱动浏览器执行特定的动作,如点击.下拉等操作,同时还可以获取浏览器当前呈现的页面的源代码,做到可见即可爬.对于一些JavaScript动态渲染的页面来说 ...
- 【httpwatch】httpwatch对测试的应用
HttpWatch是一款网页数据分析工具,是浏览器插件,集成在IE浏览器的工具栏中.主要可以用来帮忙我们查看及分析HTTP请求的:Cookie.请求参数.请求头信息.响应头信息.响应状态.响应正文等内 ...
- cs端调用webApi
public class Httphelper { public static string Post1(string url, string postString) { using (WebClie ...
- Splunk大数据分析经验分享
转自:http://www.freebuf.com/articles/database/123006.html Splunk大数据分析经验分享:从入门到夺门而逃 Porsche 2016-12-19 ...