Java 为什么JVM找不到SpringApplication类的定义?

Java 为什么JVM找不到SpringApplication类的定义?,java,spring,spring-boot,maven,Java,Spring,Spring Boot,Maven,这看起来像是问题的复制品,但它的解决方案对我不起作用。当我尝试使用spring boot运行应用程序时,在com.example.demo.Application.main的线程“main”java.lang.NoClassDefFoundError:org/springframework/boot/SpringApplication中出现异常。Mypom.xml: <?xml version="1.0" encoding="UTF-8"?>

这看起来像是问题的复制品,但它的解决方案对我不起作用。当我尝试使用spring boot运行应用程序时,在com.example.demo.Application.main的线程“main”java.lang.NoClassDefFoundError:org/springframework/boot/SpringApplication中出现
异常。My
pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.example.blog</groupId>
    <artifactId>module-8-16-springboot-webflow-thymeleaf</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.1.RELEASE</version>
        <relativePath />
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.webflow</groupId>
            <artifactId>spring-webflow</artifactId>
            <version>2.5.0.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.webflow</groupId>
            <artifactId>org.springframework.js</artifactId>
            <version>2.0.5.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>

        <!-- And other dependencies -->

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>

4.0.0
com.example.blog
模块8-16-springboot-webflow-thymeleaf
0.0.1-快照
罐子
org.springframework.boot
spring启动程序父级
2.0.1.1发布
UTF-8
UTF-8
1.8
org.springframework.boot
SpringBootStarterWeb
org.springframework.webflow
SpringWebFlow
2.5.0.1发布
org.springframework.webflow
org.springframework.js
2.0.5.1发布
org.springframework.boot
弹簧靴开发工具
运行时
org.springframework.boot
弹簧起动试验
测试
org.springframework.boot
弹簧启动装置
org.springframework.boot
springbootmaven插件

JDK1.8和JRE 8安装在系统上,以前工作正常。我删除了系统上的
C:\Users\{username}\.M2\repository\org\springframework\boot
目录,并强制Maven重新加载依赖项。然后我反编译了文件
C:\Users\{username}\.M2\repository\org\springframework\boot\spring boot\2.0.1.RELEASE\spring-boot-2.0.1.RELEASE.jar
,仍然发现它有JVM找不到的
SpringApplication
类。我还显式地向项目中添加了
spring-boot-2.0.1.RELEASE.jar
,但错误保持不变。只是有人怀疑我使用的是开放JDK,而不是Oracle,它没有安装在系统上,只是下载了部署的文件并将它们放在我需要的文件夹中(JDK安装程序出于某种原因对我不起作用)。有人对这个问题可能与什么有关有什么建议吗?

不要定义spring boot定义的依赖项的不同版本,例如:
spring webflow
进一步添加完整的异常以及您如何调用Maven?@khmarbaisec我如何调用Maven?从EclipseIDE
Maven->updateproject
,然后
runas->Maven Install
。感谢您的提示。我将尝试更改依赖项的版本。