方式一:
//指定pom文件的parent
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.1.RELEASE</version>
</parent>
方式二(适合多模块项目集中管理版本):
<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>
多模块项目中可以在父模块中用dependencyManagement声明依赖(并不实现引入),子模块通过<parent></parent>引入父模块即可实现统一版本管理。