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文件夹的,启动成功!
原文地址:https://www.cnblogs.com/thinkingandworkinghard/p/6273478.html