无法解析类型org.springframework.core.nestedruntimeexception。它是从必需的.class文件间接引用的

无法解析类型org.springframework.core.nestedruntimeexception。它是从必需的.class文件间接引用的,spring,Spring,我是春天的新手。在我的主类中使用ApplicationContext时,我得到以下错误 无法解析类型org.springframework.core.NestedRuntimeException。它是从必需的.class文件间接引用的 我正在maven上使用Spring4.3.7。请帮助 我只想使用spring boot…它使从spring开始变得更容易。发生此错误是因为您的类路径中没有所有正确的JAR,例如,添加到maven/gradle/buildpath文件: <dependen

我是春天的新手。在我的主类中使用ApplicationContext时,我得到以下错误

无法解析类型org.springframework.core.NestedRuntimeException。它是从必需的.class文件间接引用的
我正在maven上使用Spring4.3.7。请帮助


我只想使用spring boot…它使从spring开始变得更容易。发生此错误是因为您的类路径中没有所有正确的JAR,例如,添加到maven/gradle/buildpath文件:

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>4.3.7.RELEASE</version>
</dependency>

org.springframework
弹簧芯
4.3.7.1发布

我也遇到了同样的问题,因为我的本地存储库已损坏。我手动删除了本地存储库,并强制maven再次下载

最好对所有SpringJAR使用相同的SpringFramework依赖项版本


只需转到下载依赖项(springframework)的.m2文件夹并手动删除即可。
然后再次将依赖项粘贴到pom.xml文件中并保存。但要使用稳定的internet连接进行操作。

我在4.3.6中没有遇到这个问题。我不能使用ApplicationContext。如果我只使用Spring Core,请不要发布代码图片,而是发布代码本身