Failed to load ApplicationContext解决办法,spring版本问题
有如下报错:
"D:\Program Files\Java\jdk-13.0.1\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:7325,suspend=y,server=n -ea -Didea.test.cyclic.buffer.size=1048576 -Dfile.encoding=UTF-8 -classpath "D:\Program Files\JetBrains\IntelliJ IDEA 2021.2.1\lib\idea_rt.jar;C:\Users\Afra\.m2\repository\org\junit\platform\junit-platform-launcher\1.8.2\junit-platform-launcher-1.8.2.jar;C:\Users\Afra\.m2\repository\org\junit\platform\junit-platform-engine\1.8.2\junit-platform-engine-1.8.2.jar;C:\Users\Afra\.m2\repository\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar;C:\Users\Afra\.m2\repository\org\junit\platform\junit-platform-commons\1.8.2\junit-platform-commons-1.8.2.jar;C:\Users\Afra\.m2\repository\org\apiguardian\apiguardian-api\1.1.2\apiguardian-api-1.1.2.jar;D:\Program Files\JetBrains\IntelliJ IDEA 2021.2.1\plugins\junit\lib\junit5-rt.jar;D:\Program Files\JetBrains\IntelliJ IDEA 2021.2.1\plugins\junit\lib\junit-rt.jar;D:\Code\new2\gulimall\product\target\test-classes;D:\Code\new2\gulimall\product\target\classes;D:\Code\new2\gulimall\common\target\classes;D:\tools\maven\repository\com\baomidou\mybatis-plus-boot-starter\3.2.0\mybatis-plus-boot-starter-3.2.0.jar;D:\tools\maven\repository\com\baomidou\mybatis-plus\3.2.0\mybatis-plus-3.2.0.jar;D:\tools\maven\repository\com\baomidou\mybatis-plus-extension\3.2.0\mybatis-plus-extension-3.2.0.jar;D:\tools\maven\repository\com\baomidou\mybatis-plus-core\3.2.0\mybatis-plus-core-3.2.0.jar;D:\tools\maven\repository\com\baomidou\mybatis-plus-annotation\3.2.0\mybatis-plus-annotation-3.2.0.jar;D:\tools\maven\repository\com\github\jsqlparser\jsqlparser\2.1\jsqlparser-2.1.jar;D:\tools\maven\repository\org\mybatis\mybatis\3.5.2\mybatis-3.5.2.jar;D:\tools\maven\repository\org\mybatis\mybatis-spring\2.0.2\mybatis-spring-2.0.2.jar;D:\tools\maven\repository\org\springframework\boot\spring-boot-autoconfigure\2.7.15\spring-boot-autoconfigure-2.7.15.jar;D:\tools\maven\repository\org\springframework\boot\spring-boot-starter-jdbc\2.7.15\spring-boot-starter-jdbc-2.7.15.jar;D:\tools\maven\repository\com\zaxxer\HikariCP\4.0.3\HikariCP-4.0.3.jar;D:\tools\maven\repository\org\springframework\spring-jdbc\5.3.29\spring-jdbc-5.3.29.jar;D:\tools\maven\repository\org\springframework\spring-tx\5.3.29\spring-tx-5.3.29.jar;D:\tools\maven\repository\org\apache\httpcomponents\httpcore\4.4.16\httpcore-4.4.16.jar;D:\tools\maven\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;D:\tools\maven\repository\com\mysql\mysql-connector-j\8.0.33\mysql-connector-j-8.0.33.jar;D:\tools\maven\repository\org\springframework\boot\spring-boot-starter-web\2.7.15\spring-boot-starter-web-2.7.15.jar;D:\tools\maven\repository\org\springframework\boot\spring-boot-starter\2.7.15\spring-boot-starter-2.7.15.jar;D:\tools\maven\repository\org\springframework\boot\spring-boot\2.7.15\spring-boot-2.7.15.jar;D:\tools\maven\repository\org\springframework\boot\spring-boot-starter-logging\2.7.15\spring-boot-starter-logging-2.7.15.jar;D:\tools\maven\repository\ch\qos\logback\logback-classic\1.2.12\logback-classic-1.2.12.jar;D:\tools\maven\repository\ch\qos\logback\logback-core\1.2.12\logback-core-1.2.12.jar;D:\tools\maven\repository\org\apache\logging\log4j\log4j-to-slf4j\2.17.2\log4j-to-slf4j-2.17.2.jar;D:\tools\maven\repository\org\apache\logging\log4j\log4j-api\2.17.2\log4j-api-2.17.2.jar;D:\tools\maven\repository\org\slf4j\jul-to-slf4j\1.7.36\jul-to-slf4j-1.7.36.jar;D:\tools\maven\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;D:\tools\maven\repository\org\yaml\snakeyaml\1.30\snakeyaml-1.30.jar;D:\tools\maven\repository\org\springframework\boot\spring-boot-starter-json\2.7.15\spring-boot-starter-json-2.7.15.jar;D:\tools\maven\repository\com\fasterxml\jackson\core\jackson-databind\2.13.5\jackson-databind-2.13.5.jar;D:\tools\maven\repository\com\fasterxml\jackson\core\jackson-annotations\2.13.5\jackson-annotations-2.13.5.jar;D:\tools\maven\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.13.5\jackson-datatype-jdk8-2.13.5.jar;D:\tools\maven\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.13.5\jackson-datatype-jsr310-2.13.5.jar;D:\tools\maven\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.13.5\jackson-module-parameter-names-2.13.5.jar;D:\tools\maven\repository\org\springframework\boot\spring-boot-starter-tomcat\2.7.15\spring-boot-starter-tomcat-2.7.15.jar;D:\tools\maven\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.79\tomcat-embed-core-9.0.79.jar;D:\tools\maven\repository\org\apache\tomcat\embed\tomcat-embed-el\9.0.79\tomcat-embed-el-9.0.79.jar;D:\tools\maven\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.79\tomcat-embed-websocket-9.0.79.jar;D:\tools\maven\repository\org\springframework\spring-web\5.3.29\spring-web-5.3.29.jar;D:\tools\maven\repository\org\springframework\spring-beans\5.3.29\spring-beans-5.3.29.jar;D:\tools\maven\repository\org\springframework\spring-webmvc\5.3.29\spring-webmvc-5.3.29.jar;D:\tools\maven\repository\org\springframework\spring-aop\5.3.29\spring-aop-5.3.29.jar;D:\tools\maven\repository\org\springframework\spring-context\5.3.29\spring-context-5.3.29.jar;D:\tools\maven\repository\org\springframework\spring-expression\5.3.29\spring-expression-5.3.29.jar;D:\tools\maven\repository\org\springframework\cloud\spring-cloud-starter-openfeign\4.0.4\spring-cloud-starter-openfeign-4.0.4.jar;D:\tools\maven\repository\org\springframework\cloud\spring-cloud-starter\4.0.4\spring-cloud-starter-4.0.4.jar;D:\tools\maven\repository\org\springframework\security\spring-security-rsa\1.0.12.RELEASE\spring-security-rsa-1.0.12.RELEASE.jar;D:\tools\maven\repository\org\bouncycastle\bcpkix-jdk18on\1.73\bcpkix-jdk18on-1.73.jar;D:\tools\maven\repository\org\bouncycastle\bcprov-jdk18on\1.73\bcprov-jdk18on-1.73.jar;D:\tools\maven\repository\org\bouncycastle\bcutil-jdk18on\1.73\bcutil-jdk18on-1.73.jar;D:\tools\maven\repository\org\springframework\cloud\spring-cloud-openfeign-core\4.0.4\spring-cloud-openfeign-core-4.0.4.jar;D:\tools\maven\repository\org\springframework\boot\spring-boot-starter-aop\2.7.15\spring-boot-starter-aop-2.7.15.jar;D:\tools\maven\repository\org\aspectj\aspectjweaver\1.9.7\aspectjweaver-1.9.7.jar;D:\tools\maven\repository\io\github\openfeign\form\feign-form-spring\3.8.0\feign-form-spring-3.8.0.jar;D:\tools\maven\repository\io\github\openfeign\form\feign-form\3.8.0\feign-form-3.8.0.jar;D:\tools\maven\repository\commons-fileupload\commons-fileupload\1.5\commons-fileupload-1.5.jar;D:\tools\maven\repository\commons-io\commons-io\2.11.0\commons-io-2.11.0.jar;D:\tools\maven\repository\org\springframework\cloud\spring-cloud-commons\4.0.4\spring-cloud-commons-4.0.4.jar;D:\tools\maven\repository\org\springframework\security\spring-security-crypto\5.7.10\spring-security-crypto-5.7.10.jar;D:\tools\maven\repository\io\github\openfeign\feign-core\12.4\feign-core-12.4.jar;D:\tools\maven\repository\io\github\openfeign\feign-slf4j\12.4\feign-slf4j-12.4.jar;D:\tools\maven\repository\org\slf4j\slf4j-api\1.7.36\slf4j-api-1.7.36.jar;D:\tools\maven\repository\com\alibaba\cloud\spring-cloud-starter-alibaba-nacos-discovery\2021.1\spring-cloud-starter-alibaba-nacos-discovery-2021.1.jar;D:\tools\maven\repository\com\alibaba\cloud\spring-cloud-alibaba-commons\2021.1\spring-cloud-alibaba-commons-2021.1.jar;D:\tools\maven\repository\com\alibaba\nacos\nacos-client\1.4.1\nacos-client-1.4.1.jar;D:\tools\maven\repository\com\alibaba\nacos\nacos-common\1.4.1\nacos-common-1.4.1.jar;D:\tools\maven\repository\org\apache\httpcomponents\httpasyncclient\4.1.5\httpasyncclient-4.1.5.jar;D:\tools\maven\repository\org\apache\httpcomponents\httpcore-nio\4.4.16\httpcore-nio-4.4.16.jar;D:\tools\maven\repository\org\apache\httpcomponents\httpclient\4.5.14\httpclient-4.5.14.jar;D:\tools\maven\repository\com\alibaba\nacos\nacos-api\1.4.1\nacos-api-1.4.1.jar;D:\tools\maven\repository\com\google\guava\guava\24.1.1-jre\guava-24.1.1-jre.jar;D:\tools\maven\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;D:\tools\maven\repository\org\checkerframework\checker-compat-qual\2.0.0\checker-compat-qual-2.0.0.jar;D:\tools\maven\repository\com\google\errorprone\error_prone_annotations\2.1.3\error_prone_annotations-2.1.3.jar;D:\tools\maven\repository\com\google\j2objc\j2objc-annotations\1.1\j2objc-annotations-1.1.jar;D:\tools\maven\repository\org\codehaus\mojo\animal-sniffer-annotations\1.14\animal-sniffer-annotations-1.14.jar;D:\tools\maven\repository\commons-codec\commons-codec\1.15\commons-codec-1.15.jar;D:\tools\maven\repository\com\fasterxml\jackson\core\jackson-core\2.13.5\jackson-core-2.13.5.jar;D:\tools\maven\repository\io\prometheus\simpleclient\0.15.0\simpleclient-0.15.0.jar;D:\tools\maven\repository\io\prometheus\simpleclient_tracer_otel\0.15.0\simpleclient_tracer_otel-0.15.0.jar;D:\tools\maven\repository\io\prometheus\simpleclient_tracer_common\0.15.0\simpleclient_tracer_common-0.15.0.jar;D:\tools\maven\repository\io\prometheus\simpleclient_tracer_otel_agent\0.15.0\simpleclient_tracer_otel_agent-0.15.0.jar;D:\tools\maven\repository\com\alibaba\spring\spring-context-support\1.0.10\spring-context-support-1.0.10.jar;D:\tools\maven\repository\org\springframework\cloud\spring-cloud-context\4.0.4\spring-cloud-context-4.0.4.jar;D:\tools\maven\repository\org\projectlombok\lombok\1.18.22\lombok-1.18.22.jar;D:\tools\maven\repository\org\springframework\cloud\spring-cloud-starter-bootstrap\3.0.3\spring-cloud-starter-bootstrap-3.0.3.jar;D:\tools\maven\repository\org\springframework\boot\spring-boot-starter-test\2.7.15\spring-boot-starter-test-2.7.15.jar;D:\tools\maven\repository\org\springframework\boot\spring-boot-test\2.7.15\spring-boot-test-2.7.15.jar;D:\tools\maven\repository\org\springframework\boot\spring-boot-test-autoconfigure\2.7.15\spring-boot-test-autoconfigure-2.7.15.jar;D:\tools\maven\repository\com\jayway\jsonpath\json-path\2.7.0\json-path-2.7.0.jar;D:\tools\maven\repository\net\minidev\json-smart\2.4.11\json-smart-2.4.11.jar;D:\tools\maven\repository\net\minidev\accessors-smart\2.4.11\accessors-smart-2.4.11.jar;D:\tools\maven\repository\org\ow2\asm\asm\9.3\asm-9.3.jar;D:\tools\maven\repository\jakarta\xml\bind\jakarta.xml.bind-api\2.3.3\jakarta.xml.bind-api-2.3.3.jar;D:\tools\maven\repository\jakarta\activation\jakarta.activation-api\1.2.2\jakarta.activation-api-1.2.2.jar;D:\tools\maven\repository\org\assertj\assertj-core\3.22.0\assertj-core-3.22.0.jar;D:\tools\maven\repository\org\hamcrest\hamcrest\2.2\hamcrest-2.2.jar;D:\tools\maven\repository\org\junit\jupiter\junit-jupiter\5.8.2\junit-jupiter-5.8.2.jar;D:\tools\maven\repository\org\junit\jupiter\junit-jupiter-api\5.8.2\junit-jupiter-api-5.8.2.jar;D:\tools\maven\repository\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar;D:\tools\maven\repository\org\junit\platform\junit-platform-commons\1.8.2\junit-platform-commons-1.8.2.jar;D:\tools\maven\repository\org\apiguardian\apiguardian-api\1.1.2\apiguardian-api-1.1.2.jar;D:\tools\maven\repository\org\junit\jupiter\junit-jupiter-params\5.8.2\junit-jupiter-params-5.8.2.jar;D:\tools\maven\repository\org\junit\jupiter\junit-jupiter-engine\5.8.2\junit-jupiter-engine-5.8.2.jar;D:\tools\maven\repository\org\junit\platform\junit-platform-engine\1.8.2\junit-platform-engine-1.8.2.jar;D:\tools\maven\repository\org\mockito\mockito-core\4.5.1\mockito-core-4.5.1.jar;D:\tools\maven\repository\net\bytebuddy\byte-buddy\1.12.23\byte-buddy-1.12.23.jar;D:\tools\maven\repository\net\bytebuddy\byte-buddy-agent\1.12.23\byte-buddy-agent-1.12.23.jar;D:\tools\maven\repository\org\objenesis\objenesis\3.2\objenesis-3.2.jar;D:\tools\maven\repository\org\mockito\mockito-junit-jupiter\4.5.1\mockito-junit-jupiter-4.5.1.jar;D:\tools\maven\repository\org\skyscreamer\jsonassert\1.5.1\jsonassert-1.5.1.jar;D:\tools\maven\repository\com\vaadin\external\google\android-json\0.0.20131108.vaadin1\android-json-0.0.20131108.vaadin1.jar;D:\tools\maven\repository\org\springframework\spring-core\5.3.29\spring-core-5.3.29.jar;D:\tools\maven\repository\org\springframework\spring-jcl\5.3.29\spring-jcl-5.3.29.jar;D:\tools\maven\repository\org\springframework\spring-test\5.3.29\spring-test-5.3.29.jar;D:\tools\maven\repository\org\xmlunit\xmlunit-core\2.9.1\xmlunit-core-2.9.1.jar" com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit5 com.gulimall.product.ProductApplicationTests,contextLoads
Connected to the target VM, address: '127.0.0.1:7325', transport: 'socket'
23:10:59.453 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate]
23:10:59.469 [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)]
23:10:59.532 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating TestContextBootstrapper for test class [com.gulimall.product.ProductApplicationTests] from class [org.springframework.boot.test.context.SpringBootTestContextBootstrapper]
23:10:59.553 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Neither @ContextConfiguration nor @ContextHierarchy found for test class [com.gulimall.product.ProductApplicationTests], using SpringBootContextLoader
23:10:59.561 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [com.gulimall.product.ProductApplicationTests]: class path resource [com/gulimall/product/ProductApplicationTests-context.xml] does not exist
23:10:59.562 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [com.gulimall.product.ProductApplicationTests]: class path resource [com/gulimall/product/ProductApplicationTestsContext.groovy] does not exist
23:10:59.563 [main] INFO org.springframework.test.context.support.AbstractContextLoader - Could not detect default resource locations for test class [com.gulimall.product.ProductApplicationTests]: no resource found for suffixes {-context.xml, Context.groovy}.
23:10:59.564 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [com.gulimall.product.ProductApplicationTests]: ProductApplicationTests does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
23:10:59.659 [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 [com.gulimall.product.ProductApplicationTests]
23:10:59.774 [main] DEBUG org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider - Identified candidate component class: file [D:\Code\new2\gulimall\product\target\classes\com\gulimall\product\ProductApplication.class]
23:10:59.775 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Found @SpringBootConfiguration com.gulimall.product.ProductApplication for test class com.gulimall.product.ProductApplicationTests
23:10:59.991 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - @TestExecutionListeners is not present for class [com.gulimall.product.ProductApplicationTests]: using defaults.
23:10:59.992 [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]
23:11:00.050 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@60a2630a, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@29df4d43, org.springframework.test.context.event.ApplicationEventsTestExecutionListener@5dd91bca, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@40cb698e, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@3382f8ae, org.springframework.test.context.support.DirtiesContextTestExecutionListener@60641ec8, org.springframework.test.context.transaction.TransactionalTestExecutionListener@75f65e45, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@6eeade6c, org.springframework.test.context.event.EventPublishingTestExecutionListener@4a891c97, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@a5bd950, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@4d18aa28, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@75390459, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@7756c3cd, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@2313052e, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener@2bd2b28e]
23:11:00.059 [main] DEBUG org.springframework.test.context.support.AbstractDirtiesContextTestExecutionListener - Before test class: context [DefaultTestContext@2262b621 testClass = ProductApplicationTests, testInstance = [null], testMethod = [null], testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@7e928e2f testClass = ProductApplicationTests, locations = '{}', classes = '{class com.gulimall.product.ProductApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@1722011b, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@7cb502c, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@55cf0d14, org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@6cdba6dc, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@5717c37, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@5a4aa2f2], 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].
23:11:00.105 [main] ERROR org.springframework.test.context.TestContextManager - Caught exception while allowing TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener@60a2630a] to prepare test instance [com.gulimall.product.ProductApplicationTests@62ea3440]
java.lang.IllegalStateException: Failed to load ApplicationContextat org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:98)at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124)at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190)at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132)at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:248)at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:138)at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$8(ClassBasedTestDescriptor.java:363)at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:368)at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$9(ClassBasedTestDescriptor.java:363)at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1621)at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312)at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735)at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:362)at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:283)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:282)at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:272)at java.base/java.util.Optional.orElseGet(Optional.java:362)at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:271)at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31)at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:102)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:101)at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:66)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123)at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90)at java.base/java.util.ArrayList.forEach(ArrayList.java:1507)at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)at java.base/java.util.ArrayList.forEach(ArrayList.java:1507)at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)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)
Caused by: java.lang.IllegalArgumentException: Cannot instantiate interface org.springframework.boot.BootstrapRegistryInitializer : org.springframework.cloud.bootstrap.RefreshBootstrapRegistryInitializerat org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:449)at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:431)at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:424)at org.springframework.boot.SpringApplication.<init>(SpringApplication.java:265)at org.springframework.boot.SpringApplication.<init>(SpringApplication.java:245)at org.springframework.boot.test.context.SpringBootContextLoader.getSpringApplication(SpringBootContextLoader.java:170)at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:95)at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:141)at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:90)... 69 common frames omitted
Caused by: java.lang.UnsupportedClassVersionError: org/springframework/cloud/bootstrap/RefreshBootstrapRegistryInitializer has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 57.0at java.base/java.lang.ClassLoader.defineClass1(Native Method)at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:821)at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:719)at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:642)at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:600)at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)at java.base/java.lang.Class.forName0(Native Method)at java.base/java.lang.Class.forName(Class.java:416)at org.springframework.util.ClassUtils.forName(ClassUtils.java:284)at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:442)... 77 common frames omittedjava.lang.IllegalStateException: Failed to load ApplicationContextat org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:98)at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124)at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190)at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132)at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:248)at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:138)at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$8(ClassBasedTestDescriptor.java:363)at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:368)at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$9(ClassBasedTestDescriptor.java:363)at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1621)at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312)at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735)at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:362)at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:283)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:282)at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:272)at java.base/java.util.Optional.orElseGet(Optional.java:362)at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:271)at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31)at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:102)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:101)at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:66)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123)at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90)at java.base/java.util.ArrayList.forEach(ArrayList.java:1507)at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)at java.base/java.util.ArrayList.forEach(ArrayList.java:1507)at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)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)
Caused by: java.lang.IllegalArgumentException: Cannot instantiate interface org.springframework.boot.BootstrapRegistryInitializer : org.springframework.cloud.bootstrap.RefreshBootstrapRegistryInitializerat org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:449)at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:431)at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:424)at org.springframework.boot.SpringApplication.<init>(SpringApplication.java:265)at org.springframework.boot.SpringApplication.<init>(SpringApplication.java:245)at org.springframework.boot.test.context.SpringBootContextLoader.getSpringApplication(SpringBootContextLoader.java:170)at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:95)at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:141)at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:90)... 69 more
Caused by: java.lang.UnsupportedClassVersionError: org/springframework/cloud/bootstrap/RefreshBootstrapRegistryInitializer has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 57.0at java.base/java.lang.ClassLoader.defineClass1(Native Method)at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:821)at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:719)at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:642)at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:600)at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)at java.base/java.lang.Class.forName0(Native Method)at java.base/java.lang.Class.forName(Class.java:416)at org.springframework.util.ClassUtils.forName(ClassUtils.java:284)at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:442)... 77 more23:11:00.134 [main] DEBUG org.springframework.test.context.support.AbstractDirtiesContextTestExecutionListener - After test class: context [DefaultTestContext@2262b621 testClass = ProductApplicationTests, testInstance = [null], testMethod = [null], testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@7e928e2f testClass = ProductApplicationTests, locations = '{}', classes = '{class com.gulimall.product.ProductApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@1722011b, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@7cb502c, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@55cf0d14, org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@6cdba6dc, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@5717c37, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@5a4aa2f2], 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].
Disconnected from the target VM, address: '127.0.0.1:7325', transport: 'socket'Process finished with exit code -1
其中,最明显的是这几个报错:
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: java.lang.IllegalArgumentException: Cannot instantiate interface org.springframework.boot.BootstrapRegistryInitializer : org.springframework.cloud.bootstrap.RefreshBootstrapRegistryInitializer
Caused by: java.lang.UnsupportedClassVersionError: org/springframework/cloud/bootstrap/RefreshBootstrapRegistryInitializer has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 57.0
问题原因:
spring版本,spring-cloud版本不匹配。
根据spring官网 https://spring.io/projects/spring-cloud ,spring版本为2.7.x和2.6.x,应匹配spring-cloud版本2021.0.3
我的项目里面:
解决办法:将spring-cloud的version降低,改为如下:
<spring-cloud.version>2021.0.3</spring-cloud.version>
补充:
SpringBoot3.0.2版本所需要的JDK版本为17;
如果你的jdk为17以下,则需要修改spring-boot-starter-parent为2.7.15
关注我,在技术的道路上少走些弯路!
相关文章:

Failed to load ApplicationContext解决办法,spring版本问题
有如下报错: "D:\Program Files\Java\jdk-13.0.1\bin\java.exe" -agentlib:jdwptransportdt_socket,address127.0.0.1:7325,suspendy,servern -ea -Didea.test.cyclic.buffer.size1048576 -Dfile.encodingUTF-8 -classpath "D:\Program Files\JetBr…...

Is f(z)=1/z truly an analytic function
https://math.stackexchange.com/questions/755566/is-fz-1-z-truly-an-analytic-function...

代理模式 静态代理和动态代理(jdk、cglib)——Java入职第十一天
一、代理模式 一个类代表另一个类去完成扩展功能,在主体类的基础上,新增一个代理类,扩展主体类功能,不影响主体,完成额外功能。比如买车票,可以去代理点买,不用去火车站,主要包括静态代理和动态代理两种模式。 代理类中包含了主体类 二、静态代理 无法根据业务扩展,…...

Remmina在ubuntu22.04中无法连接Windows
Remmina在ubuntu22.04中无法连接Windows 问题 提示为: 无法通过TLS到RDP服务器… 分析 原因是Remmina需要使用openssl通过RDP加密与Windows计算机连接,而ubuntu22.04系统中OpenSSL版本为3.0,Openssl3 将 tls<1.2 和 sha1 的默认安全级别…...

【uniapp】this有时为啥打印的是undefined?(箭头函数修改this)
😉博主:初映CY的前说(前端领域) ,📒本文核心:uniapp中this指向问题 前言:this大家知道是我们当前项目的实例,我们可以在这个this上面拿到我们原型上的全部数据。这个常用在我们在方法中调用其他方法使用。 …...

2023高教社杯数学建模思路 - 复盘:光照强度计算的优化模型
文章目录 0 赛题思路1 问题要求2 假设约定3 符号约定4 建立模型5 模型求解6 实现代码 建模资料 0 赛题思路 (赛题出来以后第一时间在CSDN分享) https://blog.csdn.net/dc_sinor?typeblog 1 问题要求 现在已知一个教室长为15米,宽为12米&…...

河道漂浮物检测:安防监控/视频智能分析/AI算法智能分析技术如何助力河道整治工作?
随着社会的发展和人们生活水平的进步,水污染问题也越来越严重,水资源监管和治理成为城市发展的一大困扰,水面上的漂浮垃圾不仅会影响河道生态安全并阻碍船舶航行,还会影响人们的身体健康。 TSINGSEEE青犀AI智能分析平台在环保场景…...

Dubbo 应用切换 ZooKeeper 注册中心实例,流量无损迁移
首先思考一个问题:如果 Dubbo 应用使用 ZooKeeper 作为注册中心,现在需要切换到新的 ZooKeeper 实例,如何做到流量无损? 本文提供解决这个问题的一种方案。 场景 有两个基于 Dubbo 的微服务应用,一个是服务提供者&…...
ADB入门教程
安卓开发 文章目录 安卓开发前言USB 连接链接 前言 基本用法 命令语法 adb 命令的基本语法如下: adb [-d|-e|-s <serialNumber>] <command>如果只有一个设备/模拟器连接时,可以省略掉 [-d|-e|-s ] 这一部分,直接使用 adb 。 为…...

SQLPro Studio for Mac:强大的SQL开发和管理工具
SQLPro Studio for Mac是一款强大的Mac上使用的SQL开发和管理工具,它支持各种数据库,包括MySQL,PostgreSQL,SQLite等。使用 SQLPro Studio,您可以轻松地连接和管理您的数据库,执行SQL查询和脚本,…...

淘宝API技术解析,实现按图搜索淘宝商品
淘宝提供了开放平台接口(API)来实现按图搜索淘宝商品的功能。您可以通过以下步骤来实现: 1. 获取开放平台的访问权限:首先,您需要在淘宝开放平台创建一个应用,获取访问淘宝API的权限。具体的申请步骤和要求…...

错误:依赖检测失败: mysql-community-libs(x86-64) >= 5.7.9 被 (已安裝) mysql-community-li
错误: 错误原因:没有删除之前安装的依赖问题 解决办法: yum remove mysql-libs 再用下面指令检查一遍: rpm -qa | grep mysql 如果有还未清理的,用下面指令: rpm -e xxx...

使用MATLAB解算炼油厂的选址
背景 记得有一年的数据建模大赛,试题是炼油厂的选址,最后我们采用MATLAB编写(复制)蒙特卡洛算法,还到了省级一等奖,这里把仅有一些记忆和材料,放到这里来,用来纪念消失的青春。 本…...
AudioTrack播放音乐之getMinBufferSize
1. AudioTrack播放音乐之前需要做好准备,即需要先计算最小音频数据缓存空间 文件路径:AudioTrack.java (frameworks\base\media\java\android\media) static public int getMinBufferSize(int sampleRateInHz, int channelConfig, int audioFormat) {@参数sampleRateInHz,…...
React和Redux中的不变性
https://overreacted.io/zh-hans/a-complete-guide-to-useeffect/ 一、不变性和副作用 1.不变:不断创造新值来替换旧值 2.不变性规则: (1)当给定相同的输入时,纯函数必须始终返回相同的值 (2࿰…...

NPM 常用命令(一)
目录 1、npm 1.1 简介 1.2 依赖性 1.3 安装方式 2、npm access 2.1 命令描述 2.2 详情 3、npm adduser 3.1 描述 4、npm audit 4.1 简介 4.2 审计签名 4.3 操作示例 4.4 配置 audit-level dry-run force json package-lock-only omit foreground-scripts …...
【ES6】Promise推荐用法
一般来说,不要在then()方法里面定义 Reject 状态的回调函数(即then的第二个参数),总是使用catch方法。 // bad promise.then(function(data) {// success}, function(err) {// error});// good promise.then(function(data) { //…...
【JavaScript】版本判断
用于客户端和服务端进行版本更新判断使用,如有BUG,还望指出 效果 console.log(isAllowUpdate(1,2.0.0), // trueisAllowUpdate(2.0,2.0.0), // falseisAllowUpdate(2.0,2.0.1), // trueisAllowUpdate(2.1.1,2.1.2), // trueisAllowUpdate(2.1.3,2.1.2),…...

Nano编辑器安装使用指南
关于nano Nano编辑器是一个命令行文本编辑器,具有简单易用的界面和一些基本功能。 Nano小巧友好,提供许多额外的特性,例如交互式的查找和替换、定位到指定的行列、自动缩进、特性切换、国际化支持、文件名标记完成等。 Nano是为了代替闭源的…...

Java版电子招投标管理系统源码-电子招投标认证服务平台-权威认证
项目说明 随着公司的快速发展,企业人员和经营规模不断壮大,公司对内部招采管理的提升提出了更高的要求。在企业里建立一个公平、公开、公正的采购环境,最大限度控制采购成本至关重要。符合国家电子招投标法律法规及相关规范,以及…...

CMake基础:构建流程详解
目录 1.CMake构建过程的基本流程 2.CMake构建的具体步骤 2.1.创建构建目录 2.2.使用 CMake 生成构建文件 2.3.编译和构建 2.4.清理构建文件 2.5.重新配置和构建 3.跨平台构建示例 4.工具链与交叉编译 5.CMake构建后的项目结构解析 5.1.CMake构建后的目录结构 5.2.构…...
基于Uniapp开发HarmonyOS 5.0旅游应用技术实践
一、技术选型背景 1.跨平台优势 Uniapp采用Vue.js框架,支持"一次开发,多端部署",可同步生成HarmonyOS、iOS、Android等多平台应用。 2.鸿蒙特性融合 HarmonyOS 5.0的分布式能力与原子化服务,为旅游应用带来…...
Java - Mysql数据类型对应
Mysql数据类型java数据类型备注整型INT/INTEGERint / java.lang.Integer–BIGINTlong/java.lang.Long–––浮点型FLOATfloat/java.lang.FloatDOUBLEdouble/java.lang.Double–DECIMAL/NUMERICjava.math.BigDecimal字符串型CHARjava.lang.String固定长度字符串VARCHARjava.lang…...
在Ubuntu中设置开机自动运行(sudo)指令的指南
在Ubuntu系统中,有时需要在系统启动时自动执行某些命令,特别是需要 sudo权限的指令。为了实现这一功能,可以使用多种方法,包括编写Systemd服务、配置 rc.local文件或使用 cron任务计划。本文将详细介绍这些方法,并提供…...
JVM暂停(Stop-The-World,STW)的原因分类及对应排查方案
JVM暂停(Stop-The-World,STW)的完整原因分类及对应排查方案,结合JVM运行机制和常见故障场景整理而成: 一、GC相关暂停 1. 安全点(Safepoint)阻塞 现象:JVM暂停但无GC日志,日志显示No GCs detected。原因:JVM等待所有线程进入安全点(如…...
jmeter聚合报告中参数详解
sample、average、min、max、90%line、95%line,99%line、Error错误率、吞吐量Thoughput、KB/sec每秒传输的数据量 sample(样本数) 表示测试中发送的请求数量,即测试执行了多少次请求。 单位,以个或者次数表示。 示例:…...

基于PHP的连锁酒店管理系统
有需要请加文章底部Q哦 可远程调试 基于PHP的连锁酒店管理系统 一 介绍 连锁酒店管理系统基于原生PHP开发,数据库mysql,前端bootstrap。系统角色分为用户和管理员。 技术栈 phpmysqlbootstrapphpstudyvscode 二 功能 用户 1 注册/登录/注销 2 个人中…...

【Linux】自动化构建-Make/Makefile
前言 上文我们讲到了Linux中的编译器gcc/g 【Linux】编译器gcc/g及其库的详细介绍-CSDN博客 本来我们将一个对于编译来说很重要的工具:make/makfile 1.背景 在一个工程中源文件不计其数,其按类型、功能、模块分别放在若干个目录中,mak…...

图解JavaScript原型:原型链及其分析 | JavaScript图解
忽略该图的细节(如内存地址值没有用二进制) 以下是对该图进一步的理解和总结 1. JS 对象概念的辨析 对象是什么:保存在堆中一块区域,同时在栈中有一块区域保存其在堆中的地址(也就是我们通常说的该变量指向谁&…...
机器学习的数学基础:线性模型
线性模型 线性模型的基本形式为: f ( x ) ω T x b f\left(\boldsymbol{x}\right)\boldsymbol{\omega}^\text{T}\boldsymbol{x}b f(x)ωTxb 回归问题 利用最小二乘法,得到 ω \boldsymbol{\omega} ω和 b b b的参数估计$ \boldsymbol{\hat{\omega}}…...