楼主在新学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>