完整报错信息:

"C:\Program Files\Java\jdk1.8.0_301\bin\java.exe" -ea -Didea.test.cyclic.buffer.size=1048576 "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2021.2.2\lib\idea_rt.jar=53174:C:\Program Files\JetBrains\IntelliJ IDEA 2021.2.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2021.2.2\lib\idea_rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2021.2.2\plugins\junit\lib\junit5-rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2021.2.2\plugins\junit\lib\junit-rt.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\rt.jar;C:\Users\Cloud9\IdeaProjects\EveryThing-Framework\target\test-classes;C:\Users\Cloud9\IdeaProjects\EveryThing-Framework\target\classes;D:\Maven Local Repository\org\apache\curator\curator-framework\5.2.0\curator-framework-5.2.0.jar;D:\Maven Local Repository\org\apache\curator\curator-client\5.2.0\curator-client-5.2.0.jar;D:\Maven Local Repository\org\apache\zookeeper\zookeeper\3.6.3\zookeeper-3.6.3.jar;D:\Maven Local Repository\org\apache\zookeeper\zookeeper-jute\3.6.3\zookeeper-jute-3.6.3.jar;D:\Maven Local Repository\org\apache\yetus\audience-annotations\0.5.0\audience-annotations-0.5.0.jar;D:\Maven Local Repository\io\netty\netty-handler\4.1.63.Final\netty-handler-4.1.63.Final.jar;D:\Maven Local Repository\io\netty\netty-common\4.1.63.Final\netty-common-4.1.63.Final.jar;D:\Maven Local Repository\io\netty\netty-resolver\4.1.63.Final\netty-resolver-4.1.63.Final.jar;D:\Maven Local Repository\io\netty\netty-buffer\4.1.63.Final\netty-buffer-4.1.63.Final.jar;D:\Maven Local Repository\io\netty\netty-transport\4.1.63.Final\netty-transport-4.1.63.Final.jar;D:\Maven Local Repository\io\netty\netty-codec\4.1.63.Final\netty-codec-4.1.63.Final.jar;D:\Maven Local Repository\io\netty\netty-transport-native-epoll\4.1.63.Final\netty-transport-native-epoll-4.1.63.Final.jar;D:\Maven Local Repository\io\netty\netty-transport-native-unix-common\4.1.63.Final\netty-transport-native-unix-common-4.1.63.Final.jar;D:\Maven Local Repository\org\apache\curator\curator-recipes\5.2.0\curator-recipes-5.2.0.jar;D:\Maven Local Repository\commons-io\commons-io\2.11.0\commons-io-2.11.0.jar;D:\Maven Local Repository\commons-beanutils\commons-beanutils\1.7.0\commons-beanutils-1.7.0.jar;D:\Maven Local Repository\commons-logging\commons-logging\1.0.3\commons-logging-1.0.3.jar;D:\Maven Local Repository\org\javassist\javassist\3.26.0-GA\javassist-3.26.0-GA.jar;D:\Maven Local Repository\com\alibaba\fastjson\1.2.78\fastjson-1.2.78.jar;D:\Maven Local Repository\javax\servlet\javax.servlet-api\4.0.1\javax.servlet-api-4.0.1.jar;D:\Maven Local Repository\javax\servlet\jstl\1.2\jstl-1.2.jar;D:\Maven Local Repository\javax\servlet\jsp\javax.servlet.jsp-api\2.3.3\javax.servlet.jsp-api-2.3.3.jar;D:\Maven Local Repository\org\reflections\reflections\0.9.11\reflections-0.9.11.jar;D:\Maven Local Repository\com\google\guava\guava\20.0\guava-20.0.jar;D:\Maven Local Repository\mysql\mysql-connector-java\8.0.25\mysql-connector-java-8.0.25.jar;D:\Maven Local Repository\com\google\protobuf\protobuf-java\3.11.4\protobuf-java-3.11.4.jar;D:\Maven Local Repository\io\jsonwebtoken\jjwt\0.9.1\jjwt-0.9.1.jar;D:\Maven Local Repository\com\fasterxml\jackson\core\jackson-databind\2.9.6\jackson-databind-2.9.6.jar;D:\Maven Local Repository\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;D:\Maven Local Repository\com\fasterxml\jackson\core\jackson-core\2.9.6\jackson-core-2.9.6.jar;D:\Maven Local Repository\org\apache\httpcomponents\httpclient\4.5.13\httpclient-4.5.13.jar;D:\Maven Local Repository\org\apache\httpcomponents\httpcore\4.4.13\httpcore-4.4.13.jar;D:\Maven Local Repository\commons-codec\commons-codec\1.11\commons-codec-1.11.jar;D:\Maven Local Repository\org\apache\httpcomponents\httpmime\4.5.13\httpmime-4.5.13.jar;D:\Maven Local Repository\junit\junit\4.12\junit-4.12.jar;D:\Maven Local Repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;D:\Maven Local Repository\org\slf4j\slf4j-api\1.7.32\slf4j-api-1.7.32.jar;D:\Maven Local Repository\org\slf4j\slf4j-log4j12\1.7.32\slf4j-log4j12-1.7.32.jar;D:\Maven Local Repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;D:\Maven Local Repository\cglib\cglib\2.2.2\cglib-2.2.2.jar;D:\Maven Local Repository\asm\asm\3.3.1\asm-3.3.1.jar;D:\Maven Local Repository\org\apache\poi\poi\5.0.0\poi-5.0.0.jar;D:\Maven Local Repository\org\slf4j\jcl-over-slf4j\1.7.30\jcl-over-slf4j-1.7.30.jar;D:\Maven Local Repository\org\apache\commons\commons-collections4\4.4\commons-collections4-4.4.jar;D:\Maven Local Repository\org\apache\commons\commons-math3\3.6.1\commons-math3-3.6.1.jar;D:\Maven Local Repository\com\zaxxer\SparseBitSet\1.2\SparseBitSet-1.2.jar;D:\Maven Local Repository\org\apache\poi\poi-ooxml\5.0.0\poi-ooxml-5.0.0.jar;D:\Maven Local Repository\org\apache\poi\poi-ooxml-lite\5.0.0\poi-ooxml-lite-5.0.0.jar;D:\Maven Local Repository\org\apache\xmlbeans\xmlbeans\4.0.0\xmlbeans-4.0.0.jar;D:\Maven Local Repository\org\apache\commons\commons-compress\1.20\commons-compress-1.20.jar;D:\Maven Local Repository\com\github\virtuald\curvesapi\1.06\curvesapi-1.06.jar;D:\Maven Local Repository\org\bouncycastle\bcpkix-jdk15on\1.68\bcpkix-jdk15on-1.68.jar;D:\Maven Local Repository\org\bouncycastle\bcprov-jdk15on\1.68\bcprov-jdk15on-1.68.jar;D:\Maven Local Repository\org\apache\santuario\xmlsec\2.2.1\xmlsec-2.2.1.jar;D:\Maven Local Repository\com\fasterxml\woodstox\woodstox-core\5.2.1\woodstox-core-5.2.1.jar;D:\Maven Local Repository\org\codehaus\woodstox\stax2-api\4.2\stax2-api-4.2.jar;D:\Maven Local Repository\jakarta\xml\bind\jakarta.xml.bind-api\2.3.2\jakarta.xml.bind-api-2.3.2.jar;D:\Maven Local Repository\jakarta\activation\jakarta.activation-api\1.2.1\jakarta.activation-api-1.2.1.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-all\1.13\batik-all-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-anim\1.13\batik-anim-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-shared-resources\1.13\batik-shared-resources-1.13.jar;D:\Maven Local Repository\xml-apis\xml-apis-ext\1.3.04\xml-apis-ext-1.3.04.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-awt-util\1.13\batik-awt-util-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\xmlgraphics-commons\2.4\xmlgraphics-commons-2.4.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-bridge\1.13\batik-bridge-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-codec\1.13\batik-codec-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-constants\1.13\batik-constants-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-css\1.13\batik-css-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-dom\1.13\batik-dom-1.13.jar;D:\Maven Local Repository\xalan\xalan\2.7.2\xalan-2.7.2.jar;D:\Maven Local Repository\xalan\serializer\2.7.2\serializer-2.7.2.jar;D:\Maven Local Repository\xml-apis\xml-apis\1.4.01\xml-apis-1.4.01.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-ext\1.13\batik-ext-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-extension\1.13\batik-extension-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-gui-util\1.13\batik-gui-util-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-gvt\1.13\batik-gvt-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-i18n\1.13\batik-i18n-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-parser\1.13\batik-parser-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-rasterizer-ext\1.13\batik-rasterizer-ext-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-rasterizer\1.13\batik-rasterizer-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-script\1.13\batik-script-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-slideshow\1.13\batik-slideshow-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-squiggle-ext\1.13\batik-squiggle-ext-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-squiggle\1.13\batik-squiggle-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-svg-dom\1.13\batik-svg-dom-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-svgbrowser\1.13\batik-svgbrowser-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-svggen\1.13\batik-svggen-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-svgpp\1.13\batik-svgpp-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-svgrasterizer\1.13\batik-svgrasterizer-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-swing\1.13\batik-swing-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-transcoder\1.13\batik-transcoder-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-util\1.13\batik-util-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-ttf2svg\1.13\batik-ttf2svg-1.13.jar;D:\Maven Local Repository\org\apache\xmlgraphics\batik-xml\1.13\batik-xml-1.13.jar;D:\Maven Local Repository\de\rototor\pdfbox\graphics2d\0.30\graphics2d-0.30.jar;D:\Maven Local Repository\org\apache\pdfbox\pdfbox\2.0.22\pdfbox-2.0.22.jar;D:\Maven Local Repository\org\apache\pdfbox\fontbox\2.0.22\fontbox-2.0.22.jar;D:\Maven Local Repository\org\elasticsearch\elasticsearch\7.15.1\elasticsearch-7.15.1.jar;D:\Maven Local Repository\org\elasticsearch\elasticsearch-core\7.15.1\elasticsearch-core-7.15.1.jar;D:\Maven Local Repository\org\elasticsearch\elasticsearch-secure-sm\7.15.1\elasticsearch-secure-sm-7.15.1.jar;D:\Maven Local Repository\org\elasticsearch\elasticsearch-x-content\7.15.1\elasticsearch-x-content-7.15.1.jar;D:\Maven Local Repository\org\yaml\snakeyaml\1.26\snakeyaml-1.26.jar;D:\Maven Local Repository\com\fasterxml\jackson\dataformat\jackson-dataformat-smile\2.10.4\jackson-dataformat-smile-2.10.4.jar;D:\Maven Local Repository\com\fasterxml\jackson\dataformat\jackson-dataformat-yaml\2.10.4\jackson-dataformat-yaml-2.10.4.jar;D:\Maven Local Repository\com\fasterxml\jackson\dataformat\jackson-dataformat-cbor\2.10.4\jackson-dataformat-cbor-2.10.4.jar;D:\Maven Local Repository\org\elasticsearch\elasticsearch-geo\7.15.1\elasticsearch-geo-7.15.1.jar;D:\Maven Local Repository\org\apache\lucene\lucene-core\8.9.0\lucene-core-8.9.0.jar;D:\Maven Local Repository\org\apache\lucene\lucene-analyzers-common\8.9.0\lucene-analyzers-common-8.9.0.jar;D:\Maven Local Repository\org\apache\lucene\lucene-backward-codecs\8.9.0\lucene-backward-codecs-8.9.0.jar;D:\Maven Local Repository\org\apache\lucene\lucene-grouping\8.9.0\lucene-grouping-8.9.0.jar;D:\Maven Local Repository\org\apache\lucene\lucene-highlighter\8.9.0\lucene-highlighter-8.9.0.jar;D:\Maven Local Repository\org\apache\lucene\lucene-join\8.9.0\lucene-join-8.9.0.jar;D:\Maven Local Repository\org\apache\lucene\lucene-memory\8.9.0\lucene-memory-8.9.0.jar;D:\Maven Local Repository\org\apache\lucene\lucene-misc\8.9.0\lucene-misc-8.9.0.jar;D:\Maven Local Repository\org\apache\lucene\lucene-queries\8.9.0\lucene-queries-8.9.0.jar;D:\Maven Local Repository\org\apache\lucene\lucene-queryparser\8.9.0\lucene-queryparser-8.9.0.jar;D:\Maven Local Repository\org\apache\lucene\lucene-sandbox\8.9.0\lucene-sandbox-8.9.0.jar;D:\Maven Local Repository\org\apache\lucene\lucene-spatial-extras\8.9.0\lucene-spatial-extras-8.9.0.jar;D:\Maven Local Repository\org\apache\lucene\lucene-spatial3d\8.9.0\lucene-spatial3d-8.9.0.jar;D:\Maven Local Repository\org\apache\lucene\lucene-suggest\8.9.0\lucene-suggest-8.9.0.jar;D:\Maven Local Repository\org\elasticsearch\elasticsearch-cli\7.15.1\elasticsearch-cli-7.15.1.jar;D:\Maven Local Repository\net\sf\jopt-simple\jopt-simple\5.0.2\jopt-simple-5.0.2.jar;D:\Maven Local Repository\com\carrotsearch\hppc\0.8.1\hppc-0.8.1.jar;D:\Maven Local Repository\org\lz4\lz4-java\1.8.0\lz4-java-1.8.0.jar;D:\Maven Local Repository\joda-time\joda-time\2.10.10\joda-time-2.10.10.jar;D:\Maven Local Repository\com\tdunning\t-digest\3.2\t-digest-3.2.jar;D:\Maven Local Repository\org\hdrhistogram\HdrHistogram\2.1.9\HdrHistogram-2.1.9.jar;D:\Maven Local Repository\org\apache\logging\log4j\log4j-api\2.11.1\log4j-api-2.11.1.jar;D:\Maven Local Repository\org\elasticsearch\jna\5.7.0-1\jna-5.7.0-1.jar;D:\Maven Local Repository\org\elasticsearch\elasticsearch-plugin-classloader\7.15.1\elasticsearch-plugin-classloader-7.15.1.jar;D:\Maven Local Repository\org\apache\activemq\activemq-all\5.16.3\activemq-all-5.16.3.jar;D:\Maven Local Repository\org\springframework\spring-core\5.2.18.RELEASE\spring-core-5.2.18.RELEASE.jar;D:\Maven Local Repository\org\springframework\spring-jcl\5.2.18.RELEASE\spring-jcl-5.2.18.RELEASE.jar;D:\Maven Local Repository\org\springframework\spring-web\5.2.18.RELEASE\spring-web-5.2.18.RELEASE.jar;D:\Maven Local Repository\org\springframework\spring-beans\5.2.18.RELEASE\spring-beans-5.2.18.RELEASE.jar;D:\Maven Local Repository\org\springframework\spring-oxm\5.2.18.RELEASE\spring-oxm-5.2.18.RELEASE.jar;D:\Maven Local Repository\org\springframework\spring-tx\5.2.18.RELEASE\spring-tx-5.2.18.RELEASE.jar;D:\Maven Local Repository\org\springframework\spring-jdbc\5.2.18.RELEASE\spring-jdbc-5.2.18.RELEASE.jar;D:\Maven Local Repository\org\springframework\spring-webmvc\5.2.18.RELEASE\spring-webmvc-5.2.18.RELEASE.jar;D:\Maven Local Repository\org\springframework\spring-context\5.2.18.RELEASE\spring-context-5.2.18.RELEASE.jar;D:\Maven Local Repository\org\springframework\spring-expression\5.2.18.RELEASE\spring-expression-5.2.18.RELEASE.jar;D:\Maven Local Repository\org\springframework\spring-aop\5.2.18.RELEASE\spring-aop-5.2.18.RELEASE.jar;D:\Maven Local Repository\org\springframework\spring-context-support\5.2.18.RELEASE\spring-context-support-5.2.18.RELEASE.jar;D:\Maven Local Repository\org\springframework\spring-test\5.2.18.RELEASE\spring-test-5.2.18.RELEASE.jar;D:\Maven Local Repository\org\springframework\spring-jms\5.2.18.RELEASE\spring-jms-5.2.18.RELEASE.jar;D:\Maven Local Repository\org\springframework\spring-messaging\5.2.18.RELEASE\spring-messaging-5.2.18.RELEASE.jar;D:\Maven Local Repository\javax\jms\javax.jms-api\2.0.1\javax.jms-api-2.0.1.jar;D:\Maven Local Repository\org\apache\xbean\xbean-spring\3.7\xbean-spring-3.7.jar" com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit4 cn.cloud9.test.activemq.springactivemq.SpringActiveMqConsumer,springActiveMqConsume
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/Maven%20Local%20Repository/org/slf4j/slf4j-log4j12/1.7.32/slf4j-log4j12-1.7.32.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/Maven%20Local%20Repository/org/apache/activemq/activemq-all/5.16.3/activemq-all-5.16.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
[2021-11-02 08:14:25 上午]:DEBUG org.springframework.test.context.junit4.SpringJUnit4ClassRunner.<init>(SpringJUnit4ClassRunner.java:139)SpringJUnit4ClassRunner constructor called with [class cn.cloud9.test.activemq.springactivemq.SpringActiveMqConsumer]
[2021-11-02 08:14:25 上午]:DEBUG org.springframework.test.context.BootstrapUtils.createCacheAwareContextLoaderDelegate(BootstrapUtils.java:96)Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate]
[2021-11-02 08:14:25 上午]:DEBUG org.springframework.test.context.BootstrapUtils.createBootstrapContext(BootstrapUtils.java:79)Instantiating BootstrapContext using constructor [public org.springframework.test.context.support.DefaultBootstrapContext(java.lang.Class,org.springframework.test.context.CacheAwareContextLoaderDelegate)]
[2021-11-02 08:14:25 上午]:DEBUG org.springframework.test.context.BootstrapUtils.resolveTestContextBootstrapper(BootstrapUtils.java:132)Instantiating TestContextBootstrapper for test class [cn.cloud9.test.activemq.springactivemq.SpringActiveMqConsumer] from class [org.springframework.test.context.support.DefaultTestContextBootstrapper] java.lang.NoSuchMethodError: org.springframework.util.Assert.notNull(Ljava/lang/Object;Ljava/util/function/Supplier;)V at org.springframework.test.context.support.ContextLoaderUtils.resolveContextConfigurationAttributes(ContextLoaderUtils.java:244)
at org.springframework.test.context.support.AbstractTestContextBootstrapper.buildMergedContextConfiguration(AbstractTestContextBootstrapper.java:295)
at org.springframework.test.context.support.AbstractTestContextBootstrapper.buildTestContext(AbstractTestContextBootstrapper.java:108)
at org.springframework.test.context.TestContextManager.<init>(TestContextManager.java:137)
at org.springframework.test.context.TestContextManager.<init>(TestContextManager.java:122)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTestContextManager(SpringJUnit4ClassRunner.java:151)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.<init>(SpringJUnit4ClassRunner.java:142)
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 org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:36)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:50)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54) Process finished with exit code -1

问题出现在使用SpringTest组件的注解 @Runwith上面

package cn.cloud9.test.activemq.springactivemq;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) // junit与spring整合
@ContextConfiguration(locations = {"classpath:ActiveMQ-Consumer.xml"}) // 加载spring配置文件
public class SpringActiveMqConsumer { @Test
public void springActiveMqConsume() throws Exception {
// ApplicationContext ac = new ClassPathXmlApplicationContext("ActiveMQ-Consumer.xml");
System.in.read();
}
}

所有Spring组件配置版本:

<spring-version>5.2.18.RELEASE</spring-version>

Junit测试版本:

        <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>

解决办法是给SpringTest单独设置版本:

        <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<!--<version>${spring-version}</version>-->
<version>4.1.6.RELEASE</version>
</dependency>

参考博客:

https://blog.csdn.net/wuzongpo/article/details/52036096

问题原因尚未找到。。。。

SpringBoot报错:

"C:\Program Files\Java\jdk1.8.0_301\bin\java.exe" -ea -Didea.test.cyclic.buffer.size=1048576 "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2021.2.2\lib\idea_rt.jar=64350:C:\Program Files\JetBrains\IntelliJ IDEA 2021.2.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Users\Cloud9\.m2\repository\org\junit\platform\junit-platform-launcher\1.7.2\junit-platform-launcher-1.7.2.jar;C:\Users\Cloud9\.m2\repository\org\apiguardian\apiguardian-api\1.1.0\apiguardian-api-1.1.0.jar;C:\Users\Cloud9\.m2\repository\org\junit\platform\junit-platform-engine\1.7.2\junit-platform-engine-1.7.2.jar;C:\Users\Cloud9\.m2\repository\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar;C:\Users\Cloud9\.m2\repository\org\junit\platform\junit-platform-commons\1.7.2\junit-platform-commons-1.7.2.jar;C:\Users\Cloud9\.m2\repository\org\junit\vintage\junit-vintage-engine\5.7.2\junit-vintage-engine-5.7.2.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2021.2.2\lib\idea_rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2021.2.2\plugins\junit\lib\junit5-rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2021.2.2\plugins\junit\lib\junit-rt.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_301\jre\lib\rt.jar;C:\Users\Cloud9\IdeaProjects\EveryThing-Interface\target\test-classes;C:\Users\Cloud9\IdeaProjects\EveryThing-Interface\target\classes;D:\Maven Local Repository\org\springframework\boot\spring-boot-starter-web\2.5.6\spring-boot-starter-web-2.5.6.jar;D:\Maven Local Repository\org\springframework\boot\spring-boot-starter\2.5.6\spring-boot-starter-2.5.6.jar;D:\Maven Local Repository\org\springframework\boot\spring-boot-starter-logging\2.5.6\spring-boot-starter-logging-2.5.6.jar;D:\Maven Local Repository\ch\qos\logback\logback-classic\1.2.6\logback-classic-1.2.6.jar;D:\Maven Local Repository\ch\qos\logback\logback-core\1.2.6\logback-core-1.2.6.jar;D:\Maven Local Repository\org\apache\logging\log4j\log4j-to-slf4j\2.14.1\log4j-to-slf4j-2.14.1.jar;D:\Maven Local Repository\org\apache\logging\log4j\log4j-api\2.14.1\log4j-api-2.14.1.jar;D:\Maven Local Repository\org\slf4j\jul-to-slf4j\1.7.32\jul-to-slf4j-1.7.32.jar;D:\Maven Local Repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;D:\Maven Local Repository\org\yaml\snakeyaml\1.28\snakeyaml-1.28.jar;D:\Maven Local Repository\org\springframework\boot\spring-boot-starter-json\2.5.6\spring-boot-starter-json-2.5.6.jar;D:\Maven Local Repository\com\fasterxml\jackson\core\jackson-databind\2.12.5\jackson-databind-2.12.5.jar;D:\Maven Local Repository\com\fasterxml\jackson\core\jackson-annotations\2.12.5\jackson-annotations-2.12.5.jar;D:\Maven Local Repository\com\fasterxml\jackson\core\jackson-core\2.12.5\jackson-core-2.12.5.jar;D:\Maven Local Repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.12.5\jackson-datatype-jdk8-2.12.5.jar;D:\Maven Local Repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.12.5\jackson-datatype-jsr310-2.12.5.jar;D:\Maven Local Repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.12.5\jackson-module-parameter-names-2.12.5.jar;D:\Maven Local Repository\org\springframework\boot\spring-boot-starter-tomcat\2.5.6\spring-boot-starter-tomcat-2.5.6.jar;D:\Maven Local Repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.54\tomcat-embed-core-9.0.54.jar;D:\Maven Local Repository\org\apache\tomcat\embed\tomcat-embed-el\9.0.54\tomcat-embed-el-9.0.54.jar;D:\Maven Local Repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.54\tomcat-embed-websocket-9.0.54.jar;D:\Maven Local Repository\org\springframework\spring-web\5.3.12\spring-web-5.3.12.jar;D:\Maven Local Repository\org\springframework\spring-beans\5.3.12\spring-beans-5.3.12.jar;D:\Maven Local Repository\org\springframework\spring-webmvc\5.3.12\spring-webmvc-5.3.12.jar;D:\Maven Local Repository\org\springframework\spring-aop\5.3.12\spring-aop-5.3.12.jar;D:\Maven Local Repository\org\springframework\spring-context\5.3.12\spring-context-5.3.12.jar;D:\Maven Local Repository\org\springframework\spring-expression\5.3.12\spring-expression-5.3.12.jar;D:\Maven Local Repository\org\springframework\experimental\spring-native\0.10.4\spring-native-0.10.4.jar;D:\Maven Local Repository\org\springframework\boot\spring-boot-starter-activemq\2.5.6\spring-boot-starter-activemq-2.5.6.jar;D:\Maven Local Repository\org\springframework\spring-jms\5.3.12\spring-jms-5.3.12.jar;D:\Maven Local Repository\org\springframework\spring-messaging\5.3.12\spring-messaging-5.3.12.jar;D:\Maven Local Repository\org\springframework\spring-tx\5.3.12\spring-tx-5.3.12.jar;D:\Maven Local Repository\org\apache\activemq\activemq-broker\5.16.3\activemq-broker-5.16.3.jar;D:\Maven Local Repository\org\apache\activemq\activemq-client\5.16.3\activemq-client-5.16.3.jar;D:\Maven Local Repository\org\fusesource\hawtbuf\hawtbuf\1.11\hawtbuf-1.11.jar;D:\Maven Local Repository\org\apache\activemq\activemq-openwire-legacy\5.16.3\activemq-openwire-legacy-5.16.3.jar;D:\Maven Local Repository\jakarta\jms\jakarta.jms-api\2.0.3\jakarta.jms-api-2.0.3.jar;D:\Maven Local Repository\jakarta\management\j2ee\jakarta.management.j2ee-api\1.1.4\jakarta.management.j2ee-api-1.1.4.jar;D:\Maven Local Repository\org\springframework\boot\spring-boot-devtools\2.5.6\spring-boot-devtools-2.5.6.jar;D:\Maven Local Repository\org\springframework\boot\spring-boot\2.5.6\spring-boot-2.5.6.jar;D:\Maven Local Repository\org\springframework\boot\spring-boot-autoconfigure\2.5.6\spring-boot-autoconfigure-2.5.6.jar;D:\Maven Local Repository\org\springframework\boot\spring-boot-configuration-processor\2.5.6\spring-boot-configuration-processor-2.5.6.jar;D:\Maven Local Repository\org\projectlombok\lombok\1.18.22\lombok-1.18.22.jar;D:\Maven Local Repository\org\springframework\boot\spring-boot-starter-test\2.5.6\spring-boot-starter-test-2.5.6.jar;D:\Maven Local Repository\org\springframework\boot\spring-boot-test\2.5.6\spring-boot-test-2.5.6.jar;D:\Maven Local Repository\org\springframework\boot\spring-boot-test-autoconfigure\2.5.6\spring-boot-test-autoconfigure-2.5.6.jar;D:\Maven Local Repository\com\jayway\jsonpath\json-path\2.5.0\json-path-2.5.0.jar;D:\Maven Local Repository\net\minidev\json-smart\2.4.7\json-smart-2.4.7.jar;D:\Maven Local Repository\net\minidev\accessors-smart\2.4.7\accessors-smart-2.4.7.jar;D:\Maven Local Repository\org\ow2\asm\asm\9.1\asm-9.1.jar;D:\Maven Local Repository\org\slf4j\slf4j-api\1.7.32\slf4j-api-1.7.32.jar;D:\Maven Local Repository\jakarta\xml\bind\jakarta.xml.bind-api\2.3.3\jakarta.xml.bind-api-2.3.3.jar;D:\Maven Local Repository\jakarta\activation\jakarta.activation-api\1.2.2\jakarta.activation-api-1.2.2.jar;D:\Maven Local Repository\org\assertj\assertj-core\3.19.0\assertj-core-3.19.0.jar;D:\Maven Local Repository\org\hamcrest\hamcrest\2.2\hamcrest-2.2.jar;D:\Maven Local Repository\org\junit\jupiter\junit-jupiter\5.7.2\junit-jupiter-5.7.2.jar;D:\Maven Local Repository\org\junit\jupiter\junit-jupiter-api\5.7.2\junit-jupiter-api-5.7.2.jar;D:\Maven Local Repository\org\apiguardian\apiguardian-api\1.1.0\apiguardian-api-1.1.0.jar;D:\Maven Local Repository\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar;D:\Maven Local Repository\org\junit\platform\junit-platform-commons\1.7.2\junit-platform-commons-1.7.2.jar;D:\Maven Local Repository\org\junit\jupiter\junit-jupiter-params\5.7.2\junit-jupiter-params-5.7.2.jar;D:\Maven Local Repository\org\junit\jupiter\junit-jupiter-engine\5.7.2\junit-jupiter-engine-5.7.2.jar;D:\Maven Local Repository\org\junit\platform\junit-platform-engine\1.7.2\junit-platform-engine-1.7.2.jar;D:\Maven Local Repository\org\mockito\mockito-core\3.9.0\mockito-core-3.9.0.jar;D:\Maven Local Repository\net\bytebuddy\byte-buddy\1.10.22\byte-buddy-1.10.22.jar;D:\Maven Local Repository\net\bytebuddy\byte-buddy-agent\1.10.22\byte-buddy-agent-1.10.22.jar;D:\Maven Local Repository\org\objenesis\objenesis\3.2\objenesis-3.2.jar;D:\Maven Local Repository\org\mockito\mockito-junit-jupiter\3.9.0\mockito-junit-jupiter-3.9.0.jar;D:\Maven Local Repository\org\skyscreamer\jsonassert\1.5.0\jsonassert-1.5.0.jar;D:\Maven Local Repository\com\vaadin\external\google\android-json\0.0.20131108.vaadin1\android-json-0.0.20131108.vaadin1.jar;D:\Maven Local Repository\org\springframework\spring-core\5.3.12\spring-core-5.3.12.jar;D:\Maven Local Repository\org\springframework\spring-jcl\5.3.12\spring-jcl-5.3.12.jar;D:\Maven Local Repository\org\springframework\spring-test\5.3.12\spring-test-5.3.12.jar;D:\Maven Local Repository\org\xmlunit\xmlunit-core\2.8.3\xmlunit-core-2.8.3.jar;D:\Maven Local Repository\junit\junit\4.13.2\junit-4.13.2.jar;D:\Maven Local Repository\org\hamcrest\hamcrest-core\2.2\hamcrest-core-2.2.jar" com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit5 cn.cloud9.everythinginterface.activemq.ActiveMqTest,ptpSender
十一月 04, 2021 7:43:30 上午 org.junit.vintage.engine.descriptor.RunnerTestDescriptor warnAboutUnfilterableRunner
警告: Runner org.junit.internal.runners.ErrorReportingRunner (used on class cn.cloud9.everythinginterface.activemq.ActiveMqTest) does not support filtering and will therefore be run completely. org.junit.runners.model.InvalidTestClassError: Invalid test class 'cn.cloud9.everythinginterface.activemq.ActiveMqTest':
1
. No runnable methods at org.junit.runners.ParentRunner.validate(ParentRunner.java:525)
at org.junit.runners.ParentRunner.<init>(ParentRunner.java:92)
at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:74)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.<init>(SpringJUnit4ClassRunner.java:137)
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.vintage.engine.discovery.DefensiveAllDefaultPossibilitiesBuilder$DefensiveAnnotatedBuilder.buildRunner(DefensiveAllDefaultPossibilitiesBuilder.java:114)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:37)
at org.junit.vintage.engine.discovery.DefensiveAllDefaultPossibilitiesBuilder.runnerForClass(DefensiveAllDefaultPossibilitiesBuilder.java:57)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
at org.junit.vintage.engine.discovery.ClassSelectorResolver.resolveTestClass(ClassSelectorResolver.java:66)
at org.junit.vintage.engine.discovery.ClassSelectorResolver.resolve(ClassSelectorResolver.java:47)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.lambda$resolve$2(EngineDiscoveryRequestResolution.java:134)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1361)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:185)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:125)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.access$100(EngineDiscoveryRequestResolution.java:57)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution$DefaultContext.resolve(EngineDiscoveryRequestResolution.java:224)
at org.junit.vintage.engine.discovery.MethodSelectorResolver.resolveParentAndAddFilter(MethodSelectorResolver.java:55)
at org.junit.vintage.engine.discovery.MethodSelectorResolver.resolve(MethodSelectorResolver.java:39)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.lambda$resolve$2(EngineDiscoveryRequestResolution.java:146)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1361)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:185)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:125)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:91)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:82)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.resolve(EngineDiscoveryRequestResolver.java:113)
at org.junit.vintage.engine.discovery.VintageDiscoverer.discover(VintageDiscoverer.java:44)
at org.junit.vintage.engine.VintageTestEngine.discover(VintageTestEngine.java:63)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:103)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:85)
at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:92)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75)
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
07:43:30.883 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate]
07:43:30.893 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating BootstrapContext using constructor [public org.springframework.test.context.support.DefaultBootstrapContext(java.lang.Class,org.springframework.test.context.CacheAwareContextLoaderDelegate)]
07:43:30.918 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating TestContextBootstrapper for test class [cn.cloud9.everythinginterface.activemq.ActiveMqTest] from class [org.springframework.boot.test.context.SpringBootTestContextBootstrapper]
07:43:30.932 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Neither @ContextConfiguration nor @ContextHierarchy found for test class [cn.cloud9.everythinginterface.activemq.ActiveMqTest], using SpringBootContextLoader
07:43:30.933 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [cn.cloud9.everythinginterface.activemq.ActiveMqTest]: class path resource [cn/cloud9/everythinginterface/activemq/ActiveMqTest-context.xml] does not exist
07:43:30.933 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [cn.cloud9.everythinginterface.activemq.ActiveMqTest]: class path resource [cn/cloud9/everythinginterface/activemq/ActiveMqTestContext.groovy] does not exist
07:43:30.933 [main] INFO org.springframework.test.context.support.AbstractContextLoader - Could not detect default resource locations for test class [cn.cloud9.everythinginterface.activemq.ActiveMqTest]: no resource found for suffixes {-context.xml, Context.groovy}.
07:43:30.973 [main] DEBUG org.springframework.test.context.support.ActiveProfilesUtils - Could not find an 'annotation declaring class' for annotation type [org.springframework.test.context.ActiveProfiles] and class [cn.cloud9.everythinginterface.activemq.ActiveMqTest]
07:43:31.099 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - @TestExecutionListeners is not present for class [cn.cloud9.everythinginterface.activemq.ActiveMqTest]: using defaults.
07:43:31.099 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener, org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.event.ApplicationEventsTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener, org.springframework.test.context.event.EventPublishingTestExecutionListener]
07:43:31.114 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@7fb4f2a9, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@4dc27487, org.springframework.test.context.event.ApplicationEventsTestExecutionListener@6a4f1a55, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@7dfd3c81, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@2584b82d, org.springframework.test.context.support.DirtiesContextTestExecutionListener@7bbc8656, org.springframework.test.context.transaction.TransactionalTestExecutionListener@6933b6c6, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@7d3e8655, org.springframework.test.context.event.EventPublishingTestExecutionListener@7dfb0c0f, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@626abbd0, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@169bb4dd, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@1f9e9475, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@3aa078fd, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@d23e042, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener@46d59067]
07:43:31.119 [main] DEBUG org.springframework.test.context.support.AbstractDirtiesContextTestExecutionListener - Before test class: context [DefaultTestContext@7dc19a70 testClass = ActiveMqTest, testInstance = [null], testMethod = [null], testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@508dec2b testClass = ActiveMqTest, locations = '{}', classes = '{class cn.cloud9.everythinginterface.EveryThingInterfaceApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@5fbe4146, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@7530ad9c, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@757277dc, org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@37271612, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@2898ac89, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@2d6d8735], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -> true]], class annotated with @DirtiesContext [false] with mode [null].
07:43:31.154 [main] DEBUG org.springframework.test.context.support.TestPropertySourceUtils - Adding inlined properties to environment: {spring.jmx.enabled=false, org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true} . ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.5.6) 2021-11-04 07:43:31.465 INFO 121552 --- [ main] c.c.e.activemq.ActiveMqTest : Starting ActiveMqTest using Java 1.8.0_301 on DESKTOP-P46A09B with PID 121552 (started by Cloud9 in C:\Users\Cloud9\IdeaProjects\EveryThing-Interface)
2021-11-04 07:43:31.465 INFO 121552 --- [ main] c.c.e.activemq.ActiveMqTest : No active profile set, falling back to default profiles: default
2021-11-04 07:43:33.000 INFO 121552 --- [ main] c.c.e.activemq.ActiveMqTest : Started ActiveMqTest in 1.83 seconds (JVM running for 2.669) Process finished with exit code -1

原因是使用的这个Test

应该使用下面的这个Test注解

package cn.cloud9.everythinginterface.activemq;

import cn.cloud9.everythinginterface.EveryThingInterfaceApplication;
import org.junit.jupiter.api.Test;
// import org.junit.Test;

import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; /*** 演示SpringBoot与ActiveMQ整合- 消息生产者 */
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = EveryThingInterfaceApplication.class)
public class ActiveMqTest {
//JmsMessagingTemplate: 用于工具类发送消息
@Autowired
private JmsMessagingTemplate jmsMessagingTemplate; @Test
public void ptpSender(){
/**
* 参数一:队列的名称或主题名称 * 参数二:消息内容
*/
jmsMessagingTemplate.convertAndSend("springboot_queue","spring boot message");
} }

但是并不影响程序执行???,JMS的消息还是发送了

【Spring】使用SpringTest报错 java.lang.NoSuchMethodError的更多相关文章

  1. Spring boot Unable to start embedded Tomcat报错 java.lang.NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()

    Spring boot Unable to start embedded Tomcat 报错 java.lang.NoSuchMethodError: javax.servlet.ServletCon ...

  2. 解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level

    解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level 学习了:https://blog.csdn. ...

  3. resin下发布项目报错java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index

    我的resin版本为4.0.56; 项目在tomcat下启动正常,打包在resin下发布时报错:java.lang.NoSuchMethodError: javax.persistence.Table ...

  4. pagehelper调用mybatis报错java.lang.NoSuchMethodError:org.apache.ibatis.reflection.MetaObject.forObject

    最近在升新的基础框架到spring cloud,启动时pagehelper报错,如下: java.lang.NoSuchMethodError:org.apache.ibatis.reflection ...

  5. springboot与springcloud版本不对应导致报错java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.<init>([Ljava/lang/Object;)V

    springboot启动报错: 10:31:50.221 [main] ERROR org.springframework.boot.SpringApplication - Application r ...

  6. tomcat7 启动项目报错 java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()

    JDK版本:jdk1.8.0_77 Tomcat 版本:apache-tomcat-7.0.47 异常重现步骤: 1.完成项目部署 2.启动Tomcat 异常头部信息:java.lang.NoSuch ...

  7. new AppiumDriver<>(new URL(url), capabilities) 报错 java.lang.NoSuchMethodError: com.google.common.base.Throwables.throwIfUnchecked(Ljava/lang/Throwable;)V

    2017-10-11 17:37:02.102 INFO c.u.a.r.PrepareDriver:41 - appium server url : http://127.0.0.1:4723/wd ...

  8. hive 使用where条件报错 java.lang.NoSuchMethodError: org.apache.hadoop.hive.ql.ppd.ExprWalkerInfo.getConvertedNode

    hadoop 版本 2.6.0 hive版本 1.1.1 错误: java.lang.NoSuchMethodError: org.apache.hadoop.hive.ql.ppd.ExprWalk ...

  9. selenium 打开浏览器报错java.lang.NoSuchMethodError: org.openqa.selenium.chrome.ChromeOptions.addArguments([Ljava/lang/String;)

    java.lang.NoSuchMethodError: org.openqa.selenium.chrome.ChromeOptions.addArguments([Ljava/lang/Strin ...

  10. 使用POI操作Excel时new XSSFWorkbook ()报错java.lang.NoSuchMethodError解决方式

    使用最新的POI3.11时,在执行 Workbook  workBook = new XSSFWorkbook ();这段代码时出现错误: java.lang.NoSuchMethodError: j ...

随机推荐

  1. ts的keyof

    keyof 是 TypeScript 中的一种类型操作符,用于获取一个类型的所有键(属性名)作为联合类型.它的语法如下: type KeysOfType = keyof ObjectType; 其中: ...

  2. CSP-S2019 题解

    做了这套题,如果是让现在的我当时去考的话应该一共可以有 450 分,格雷码,括号树,树的重心都可以做,树上的数可以有 10 分,Emiya 至少可以有 76 分, 划分也可以有 64 分.看 OIer ...

  3. Redis的特点什么是?

    a.支持多种数据结构,如 string(字符串). list(双向链表).dict(hash表).set(集合).zset(排序set).hyperloglog(基数估算) b.支持持久化操作,可以进 ...

  4. 项目管理--PMBOK 读书笔记(11)【项目风险管理】

    1.风险分解结构(RBS): RBS 有两个含义,一个是资源分解结构(Resource),一个是风险分解结构(Risk). 1)技术风险 2)管理风险 3)商业风险 4)外部风险   2.核对单 核对 ...

  5. 08-Python迭代器与生成器

    迭代器 什么是迭代器 迭代是Python最强大的功能之一,是访问序列中元素的一种方式. 迭代器是一个可以记住遍历的位置的对象. 迭代器对象从集合的第一个元素开始访问,直到所有的元素被访问完结束.迭代器 ...

  6. Nginx配置文件nginx.conf中location的匹配原则

    一.空格:默认匹配.普通匹配 location / { root /home; } 二.= :精确匹配(表示匹配到  /home/resources/img/face.png 这张图片) locati ...

  7. Linux 内核:设备树(3)把device_node转换成platfrom_device

    Linux 内核:设备树(3)把device_node转换成platfrom_device 背景 在上一节中讲到设备树dtb文件中的各个节点转换成device_node的过程(<dtb转换成de ...

  8. python中dict和list的数据结构

    要理解dict的有关内容需要你理解哈希表(map)的相关基础知识,这个其实是<算法与数据结构>里面的内容. 1.list和tuple其实是用链表顺序存储的,也就是前一个元素中存储了下一个元 ...

  9. python3 socket 获取域名信息

    可以当ping用,应用场景可以在一些没有安装ping工具的镜像容器中,诊断dns或域名的可用性. #-*- coding:utf-8 -*- import socket import tracebac ...

  10. JavaWeb踩坑记录

    org.apache.ibatis.binding.BindingException: Parameter 'XXXX' not found. 或 There is no getter for pro ...