zoukankan      html  css  js  c++  java
  • java.lang.IllegalStateException: SpringJUnit4ClassRunner requires JUnit 4.12 or higher.

    1、错误日志:
    'java.lang.ExceptionInInitializerError
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:29)
    at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21)
    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:26)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:84)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:70)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:43)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
    Caused by: java.lang.IllegalStateException: SpringJUnit4ClassRunner requires JUnit 4.12 or higher.
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.(SpringJUnit4ClassRunner.java:102)
    ... 17 more'
    2、错误原因
    错误提示 SpringJUnit4ClassRunner requires JUnit 4.12 or higher 需要使用 JUnit 4.12 或更高版本。

    3、解决办法
    将JUnit 版本改为4.12

    '
    junit
    junit
    4.12
    test
    '

  • 相关阅读:
    Python第三方库SnowNLP(Simplified Chinese Text Processing)快速入门与进阶
    Python第三方库SnowNLP(Simplified Chinese Text Processing)快速入门与进阶
    用python玩微信(聊天机器人,好友信息统计)
    BIOS与UEFI
    MBR&/BOOT&GRUB
    Hard Disk Driver(GPT)
    Hard Disk Drive(MBR)
    反Secure Boot垄断:兼谈如何在Windows 8电脑上安装Linux
    硬盘分区基本知识
    计算机启动过程
  • 原文地址:https://www.cnblogs.com/Bouger/p/7148035.html
Copyright © 2011-2022 走看看