如何解决创建名为'configurationpropertiesbeans'的bean的错误?

p4rjhz4m  于 2021-07-23  发布在  Java
关注(0)|答案(0)|浏览(239)

我有一个现有的Kotlin项目。我正在运行Java11。
最近我更新了 mvn -U clean install ,而这个特殊的测试停止了工作。

import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit.jupiter.SpringExtension

    @ExtendWith(SpringExtension::class)
    @SpringBootTest
    class QuickCheck {

        @Test
        fun loadContext() {

        }

    }

我有很多依赖关系,但我认为与本案最相关的是:
springcloud上下文:2.2.6.release
spring cloud kubernetes配置:1.1.7.release
spring cloud kubernetes核心:1.1.7.release
SpringCloudStarterKubernetes配置:1.1.7.release
java.lang.illegalstateexception:未能加载applicationcontext
在org.springframework.test.context.cache.defaultcacheawarecontextloaderdelegate.loadcontext(defaultcacheawarecontextloaderdelegate。java:132)在org.springframework.test.context.support.defaulttestcontext.getapplicationcontext(defaulttestcontext。java:124)在org.springframework.test.context.web.servletestexecutionlistener.setuprequestcontextifnecessary(servletestexecutionlistener)。java:190)在org.springframework.test.context.web.servletestexecutionlistener.preparetestinstance(servletestexecutionlistener。java:132)在org.springframework.test.context.testcontextmanager.preparetestinstance(testcontextmanager。java:244)在org.springframework.test.context.junit.jupiter.springextension.postprocesstestinstance(springextension。java:138)在org.junit.jupiter.engine.descriptor.classbasedtestdescriptor.lambda$invoketestinstancepostprocessors$6(classbasedtestdescriptor)。java:350)位于org.junit.jupiter.engine.descriptor.classbasedtestdescriptor.executeandmaskthrowable(classbasedtestdescriptor)。java:355)在org.junit.jupiter.engine.descriptor.classbasedtestdescriptor.lambda$invoketestinstancepostprocessors$7(classbasedtestdescriptor)。java:350)在java.base/java.util.stream.referencepipeline$3$1.accept(referencepipeline。java:195)在java.base/java.util.stream.referencepipeline$2$1.accept(referencepipeline。java:177)在java.base/java.util.arraylist$arraylistspliterator.foreachremaining(arraylist。java:1655)在java.base/java.util.stream.abstractpipeline.copyinto(abstractpipeline。java:484)在java.base/java.util.stream.abstractpipeline.wrapandcopyinto(abstractpipeline。java:474)在java.base/java.util.stream.streamspliterators$wrappingspliterator.foreachremaining(streamspliterators。java:312)在java.base/java.util.stream.streams$concatspliterator.foreachremaining(streams。java:735)在java.base/java.util.stream.streams$concatspliterator.foreachremaining(streams。java:734)在java.base/java.util.stream.referencepipeline$head.foreach(referencepipeline。java:658)位于org.junit.jupiter.engine.descriptor.classbasedtestdescriptor.invoketestinstancepostprocessors(classbasedtestdescriptor)。java:349)在org.junit.jupiter.engine.descriptor.classbasedtestdescriptor.lambda$instanceAndPostProcessTestInstance$4(classbasedtestdescriptor)。java:270)在org.junit.platform.engine.support.hierarchical.throwablecollector.execute(throwablecollector。java:73)在org.junit.jupiter.engine.descriptor.classbasedtestdescriptor.InstanceAndPostProcessTestInstance(classbasedtestdescriptor)。java:269)位于org.junit.jupiter.engine.descriptor.classbasedtestdescriptor.lambda$testinstancesprovider$2(classbasedtestdescriptor)。java:259)在java.base/java.util.optional.orelseget(可选。java:369)在org.junit.jupiter.engine.descriptor.classbasedtestdescriptor.lambda$testinstancesprovider$3(classbasedtestdescriptor。java:258)在org.junit.jupiter.engine.execution.testinstancesprovider.gettestinstances(testinstancesprovider。java:31)在org.junit.jupiter.engine.descriptor.testmethodtestdescriptor.lambda$prepare$0(testmethodtestdescriptor)。java:101)在org.junit.platform.engine.support.hierarchical.throwablecollector.execute(throwablecollector。java:73)在org.junit.jupiter.engine.descriptor.testmethodtestdescriptor.prepare(testmethodtestdescriptor。java:100)在org.junit.jupiter.engine.descriptor.testmethodtestdescriptor.prepare(testmethodtestdescriptor。java:65)在org.junit.platform.engine.support.hierarchy.nodetesttask.lambda$prepare$1(nodetesttask。java:111)在org.junit.platform.engine.support.hierarchical.throwablecollector.execute(throwablecollector。java:73)在org.junit.platform.engine.support.hierarchy.nodetesttask.prepare(nodetesttask。java:111)在org.junit.platform.engine.support.hierarchy.nodetesttask.execute(nodetesttask。java:79)在java.base/java.util.arraylist.foreach(arraylist。java:1541)在org.junit.platform.engine.support.hierarchical.samethreadherarchicaltestexecutorservice.invokeall(samethreadherarchicaltestexecutorservice)。java:38)在org.junit.platform.engine.support.hierarchy.nodetesttask.lambda$executecursively$5(nodetesttask。java:143)在org.junit.platform.engine.support.hierarchical.throwablecollector.execute(throwablecollector。java:73)在org.junit.platform.engine.support.hierarchy.nodetesttask.lambda$executecursively$7(nodetesttask。java:129)在org.junit.platform.engine.support.hierarchy.node.around(node。java:137)在org.junit.platform.engine.support.hierarchy.nodetesttask.lambda$execute执行$8(nodetesttask。java:127)在org.junit.platform.engine.support.hierarchical.throwablecollector.execute(throwablecollector。java:73)位于org.junit.platform.engine.support.hierarchical.nodetesttask.executerecursively(nodetesttask。java:126)在org.junit.platform.engine.support.hierarchy.nodetesttask.execute(nodetesttask。java:84)在java.base/java.util.arraylist.foreach(arraylist。java:1541)位于org.junit.platform.engine.support.hierarchical.samethreadherarchicaltestexecutorservice.invokeall(samethreadherarchicaltestexecutorservice)。java:38)在org.junit.platform.engine.support.hierarchy.nodetesttask.lambda$execute执行$5(nodetesttask。java:143)在org.junit.platform.engine.support.hierarchical.throwablecollector.execute(throwablecollector。java:73)在org.junit.platform.engine.support.hierarchy.nodetesttask.lambda$executecursively$7(nodetesttask。java:129)在org.junit.platform.engine.support.hierarchy.node.around(节点。java:137)在org.junit.platform.engine.support.hierarchy.nodetesttask.lambda$executecursively$8(nodetesttask。java:127)在org.junit.platform.engine.support.hierarchical.throwablecollector.execute(throwablecollector。java:73)在org.junit.platform.engine.support.hierarchical.nodetesttask.executeRecursive(nodetesttask。java:126)在org.junit.platform.engine.support.hierarchy.nodetesttask.execute(nodetesttask。java:84)位于org.junit.platform.engine.support.hierarchical.samethreadherarchicaltestexecutorservice.submit(samethreadherarchicaltestexecutorservice)。java:32)在org.junit.platform.engine.support.hierarchical.hierarchicaltestexecutor.execute(hierarchicaltestexecutor。java:57)在org.junit.platform.engine.support.hierarchical.hierarchicaltestengine.execute(hierarchicaltestengine。java:51)在org.junit.platform.launcher.core.engeexecutionorchestrator.execute(engeexecutionorchestrator。java:108)在org.junit.platform.launcher.core.engeexecutionorchestrator.execute(engeexecutionorchestrator。java:88)在org.junit.platform.launcher.core.engeexecutionorchestrator.lambda$execute$0(engeexecutionorchestrator)。java:54)位于org.junit.platform.launcher.core.engineexecutionorchestrator.withinterceptedstreams(engineexecutionorchestrator)。java:67) 在org.junit.platform.launcher.core.engeexecutionorchestrator.execute(engeexecutionorchestrator。java:52)在org.junit.platform.launcher.core.defaultlauncher.execute(defaultlauncher。java:96)在org.junit.platform.launcher.core.defaultlauncher.execute(defaultlauncher。java:75)在com.intellij.junit5.junit5ideatestrunner.startrunnerwithargs(junit5ideatestrunner。java:71)在com.intellij.rt.junit.ideatestrunner$repeater.startrunnerwithargs(ideatestrunner。java:33)在com.intellij.rt.junit.junitstarter.preparestreamsandstart(junitstarter。java:220)在com.intellij.rt.junit.junitstarter.main(junitstarter。java:53)原因:org.springframework.beans.factory.beancreationexception:创建名为'configurationpropertiesbeans'的bean时出错,该bean在类路径资源[org/springframework/cloud/autoconfigure/configurationpropertiesbendersautoconfiguration.class]中定义:合并bean定义的后处理失败;嵌套的异常是java.lang.illegalstateexception:未能从classloader[jdk.internal.loader]内省类[org.springframework.cloud.context.properties.configurationpropertiesbeans]。classloaders$appclassloader@3b192d32]在org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory)。java:579)位于org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory)。java:524)在org.springframework.beans.factory.support.abstractbeanfactory.lambda$dogetbean$0(abstractbeanfactory)。java:335)位于org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry)。java:234)位于org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.com)。java:333)在org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory)。java:213)位于org.springframework.context.support.postprocessorregistrationlegate.registerBeanProcessors(postprocessorregistrationlegate)。java:270)在org.springframework.context.support.abstractapplicationcontext.registerbeanpostprocessors(abstractapplicationcontext。java:761)在org.springframework.context.support.abstractapplicationcontext.refresh(abstractapplicationcontext。java:566)在org.springframework.boot.springapplication.refresh(springapplication。java:767)在org.springframework.boot.springapplication.refresh(springapplication。java:759)位于org.springframework.boot.springapplication.refreshcontext(springapplication。java:426)在org.springframework.boot.springapplication.run(springapplication。java:326)在org.springframework.boot.builder.springapplicationbuilder.run(springapplicationbuilder。java:144)在org.springframework.cloud.bootstrap.bootstrapapplicationlistener.bootstrapservicecontext(bootstrapapplicationlistener)。java:212)位于org.springframework.cloud.bootstrap.bootstrapapplicationlistener.onapplicationevent(bootstrapapplicationlistener)。java:117)在org.springframewo

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题