org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.test.context.support.DelegatingSmartContextLoader]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextException
未导入spring-context
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.2.15.RELEASE</version>
</dependency>
在尝试实例化Spring的DelegatingSmartContextLoader时遇到BeanInstantiationException,问题根源是NoClassDefFoundError,具体为找不到spring-context中的ApplicationContextException类。解决此问题需要确保已正确导入spring-context依赖。
4420

被折叠的 条评论
为什么被折叠?



