java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @BootstrapWi
来源:互联网 发布:雅思在线模拟考试软件 编辑:程序博客网 时间:2024/06/14 22:04
java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @BootstrapWith's 'value' attribute or make the default bootstrapper class available. at org.springframework.test.context.BootstrapUtils.resolveTestContextBootstrapper(BootstrapUtils.java:143) at org.springframework.test.context.TestContextManager.<init>(TestContextManager.java:105) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTestContextManager(SpringJUnit4ClassRunner.java:152) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.<init>(SpringJUnit4ClassRunner.java:143) at org.springframework.test.context.junit4.SpringRunner.<init>(SpringRunner.java:49) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104) at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:49) at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)Caused by: java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.findAllMergedAnnotations(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Ljava/util/Set; at org.springframework.test.context.BootstrapUtils.resolveExplicitTestContextBootstrapper(BootstrapUtils.java:150) at org.springframework.test.context.BootstrapUtils.resolveTestContextBootstrapper(BootstrapUtils.java:126) ... 23 more
错误原因:
在使用spring-test插件执行单元测试时,需要注意的是spring-webmvc的版本应该与spring-test的版本一致,否则在执行junit测试时就会出现“Java.lang.IllegalStateException:
3 1
- java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @BootstrapWi
- java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @BootstrapWi
- Could not load TestContextBootstrapper [null]. Specify @BootstrapWith's 'val
- Starting elasticsearch: Exception in thread "main" java.lang.IllegalStateException: Could not load p
- java.lang.IllegalStateException: Could not execute method of the activity
- java.lang.IllegalStateException: Could not execute method of the activity
- java.lang.IllegalStateException: Could not find a method onStartSingleInstanceActivityClickLisenter(
- xfire java.lang.IllegalStateException: Could not initialize Service
- java.lang.IllegalStateException: Could not execute method of the activity
- xfire java.lang.IllegalStateException: Could not initialize Service
- xfire报错java.lang.IllegalStateException: Could not initialize Service.
- java.lang.IllegalStateException: Could not auto-size column.
- java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons解决方法
- java.lang.UnsatisfiedLinkError:Could not load bd_wsp_v1_0 loader dalvik.system
- OpenDaylight:java.lang.UnstatisfiedLinkError:Could not load library
- java.lang.IllegalStateException: Failed to load ApplicationContext
- java.lang.IllegalStateException: Failed to load ApplicationContext
- java.lang.IllegalStateException: Failed to load ApplicationContext
- 小白训练营 TEST by 喵仔
- gulpfile.js文件创建与配置
- JAVA的Map类:HashMap,LinkedHashMap,TreeMap,ConcurrentHashMap,WeakReferenceHashMap
- 邮件发送(三)
- WPF Chart AreaSeries绘制阴影
- java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @BootstrapWi
- ubuntu16.04上用源代码安装ICE
- spoj 1716 Can you answer these queries III
- 关于Arduino与USART HMI串口通讯
- 中介者模式
- Java集合---ConcurrentHashMap原理分析
- JS中的location属性
- linux下I2C驱动架构全面分析
- post请求下载excel文档解决方法