在进行springboot 单元测试的时候,发现如下霨如下霨进行springboot 单元测试的时候,发现如下错诜。 : Tidak dapat memuatkan CacheAwareContextLoaderDelegate [org kelas. springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate]
di org.springframework.test.context.BootstrapUtils.createCacheAwareContextLoaderDelegate(BootstrapUtils.java:103) .springframework tils.createBootstrapContext (BootstrapUtils.java:72)di org.springframework.test.context.TestContextManager.
at org.springframework.test.context.junit4.ClasTcontextManager SpringJUnit4ClassRunner.java:151)(TestContextManager.java:124) di org.springframework.test.context.junit4.SpringJUnit4ClassRunner.
(SpringJUnit4ClassRunner.java:142)
contextring org.junit4ClassRunner. ;init>(SpringRunner.java:49)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Native Impl.newInstance(Native Constructor) merenung .DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.builders. :104)
di org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
di org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder)<59>
<132>
132>59>
Atas ialah kandungan terperinci Ujian unit Springboot bergantung pada analisis kod sumber contoh pit. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!