springboot项目父依赖管理

springboot项目,pom文件中,要引用父pom文件,进而使用其依赖关系

例如:

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


问题-新项目需要引用指定的父pom,所以需要另外指定springboot的依赖管理

例如:

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.1.1.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>




posted @ 2020-08-03 11:02  internHe  阅读(1295)  评论(0编辑  收藏  举报