新建Maven项目添加springboot依赖报错"Project build error: 'dependencies.dependency.version' for org.springframewo"

楼主在新学SpringBoot框架,是个小白一枚,在新建Maven项目时,添加springboot依赖时出现个编译错误”Project build error: ‘dependencies.dependency.version’ for org.springframewo”,该提示是说添加该依赖没有version,只要添加SpringBoot的parent配置就行了.

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.4.2.RELEASE</version>
        <relativePath /> <!-- lookup parent from repository -->
</parent>

dependencies里这样配置:

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

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    原文作者:艾特不出先生
    原文地址: https://www.jianshu.com/p/a4b90a981254
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞