java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @BootstrapWith's 'value' attribute or make the default bootstrapper class available.
2017-01-11 14:16
399 查看
1.前几天搭建单元测后,今天用其测试,结果报了这个问题。网上搜索后,刚开始以为原因是 Spring的 依赖版本的问题,我现在的依赖是:
因为其他的比如说 spring-content spring -aop 等都是4.0.2 的,而且是之前已经配置好的,所以改为4.0.2;
2,改完之后让然报错,发现是 自己的test文件夹下面没有resource目录,原来
因为其他的比如说 spring-content spring -aop 等都是4.0.2 的,而且是之前已经配置好的,所以改为4.0.2;
2,改完之后让然报错,发现是 自己的test文件夹下面没有resource目录,原来
@ContextConfiguration(locations={"classpath:spring/application.xml"})指的是test下的的 resource目录 ,复制一份main文件夹的,启动成功!
相关文章推荐
- JMeter命令行执行及问题解决 Error in NonGUIDriver java.lang.RuntimeException: Could not find the TestPlan class!
- java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @BootstrapW
- 关于java.lang.NoClassDefFoundError(更新)(Could not find or load main class)
- java.lang.IllegalStateException: Driver for test database type [H2] is not available in the classpat
- java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @BootstrapWi
- java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @BootstrapWi
- RuntimeException could not be mapped to a response, re-throwing to the HTTP container java.lang.Null
- Java中Could not find the main class.program will exit和java.lang.UnsupportedClassVersionError 的解决方法
- java.lang.IllegalStateException: Could not find a method false(View) in the activity class com.xuan
- Java中Could not find the main class.program will exit和java.lang.UnsupportedClassVersionError 的解决方法
- Java运行报错:Error: Could not find or load main class
- Could not publish to the server.java.lang.NullPointerException
- 关于命令行上执行java命令的错误分析 - Could not find or load main class
- Java中Could not find the main class.program will exit和java.lang.UnsupportedClassVersionError 的解决方法
- Could not publish to the server. java.lang.NullPointerException
- 在centos中运行java命令时出现Error: Could not find or load main class XXX问题的解决方法
- Java中Could not find the main class.program will exit和java.lang.UnsupportedClassVersionError 的解决方法
- Could not publish to the server. Java.lang.NullPointerException
- java.lang.IllegalStateException: Could not find a method capture(View) in the activity class
- Could not publish to the server. java.lang.NullPointerException