官方系统构建:https://docs.spring.io/spring-boot/docs/current/reference/html/using.html#using.build-systems
使用maven构建聚合项目时,一般顶层的项目我们都没有引入parent包括spring-boot-starter-parent,很多时候顶层的项目就是其下子模块的parent,这个时候在子模块pom中是没法引入spring-boot-starter-parent的。这个时候,我们可以在顶层pom中引入spring-boot-dependencies
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
不想使用spring-boot-starter-parent,你依然可以通过使用spring-boot-dependencies的scope=import利用依赖管理的便利。
我们通过分析spring-boot-starter-parent发现它继承了spring-boot-dependencies,同时spring-boot-starter-parent提供了很多官方约定的功能