无法加载 ApplicationContext SpringBoot

时间:2021-03-23 22:23:14

标签: java spring-boot

昨天运行我的控制器测试时一切正常,但今天运行我的应用程序时,我的控制器的所有测试用例都停止工作了,下面是我收到的错误。有没有人遇到过这个问题,我一直在尝试调试,但没有成功。

java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mockMvcWebClientBuilder' defined in class path resource [org/springframework/boot/test/autoconfigure/web/servlet/MockMvcWebClientAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.test.web.servlet.htmlunit.MockMvcWebClientBuilder]: Factory method 'mockMvcWebClientBuilder' threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.gargoylesoftware.htmlunit.BrowserVersion
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.test.web.servlet.htmlunit.MockMvcWebClientBuilder]: Factory method 'mockMvcWebClientBuilder' threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.gargoylesoftware.htmlunit.BrowserVersion
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.gargoylesoftware.htmlunit.BrowserVersion

0 个答案:

没有答案