本文小编为大家详细介绍“springboot单元测试依赖踩坑实例源码分析”,内容详细,步骤清晰,细节处理妥当,希望这篇“springboot单元测试依赖踩坑实例源码分析”文章能帮助大家解决疑惑,下面跟着小编的思路慢慢深入,一起来学习新知识吧。在进行springboot 单元测试的时候,发现如下错误。java.lang.IllegalStateException: Could not load CacheAwareContextLoaderDelegate [class org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate] at org.springframework.test.context.BootstrapUtils.createCacheAwareContextLoaderDelegate(BootstrapUtils.java:103)
at org.springframework.test.context.BootstrapUtils.createBootstrapContext(BootstrapUtils.java:72)
at org.springframework.test.context.TestContextManager.
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTestContextManager(SpringJUnit4ClassRunner.java:151)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.
at org.springframework.test.context.junit4.SpringRunner.
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.bui免费云主机域名lders.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:49)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate]: Unresolvable class definition; nested exception is java.lang.NoSuchMethodError: org.springframework.core.KotlinDetector.isKotlinReflectPresent()Z
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:132)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:152)
at org.springframework.test.context.BootstrapUtils.createCacheAwareContextLoaderDelegate(BootstrapUtils.java:100)
… 20 more
Caused by: java.lang.NoSuchMethodError: org.springframework.core.KotlinDetector.isKotlinReflectPresent()Z
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:171)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:122)
… 22 more
这篇文章主要介绍“C++头文件和cpp文件的原理是什么”,在日常操作中,相信很多人在C++头文件和cpp文件的原理是什么问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”C++头文件和cpp文件的原理是什么”的疑惑有所帮助!接下来,…
免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。