<dependencyManagement>
<dependencies>
<dependency>
<!-- Import dependency management from Spring Boot -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.1.12.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
如上,有个<scope>import</scope> ,加了此属性意思是将spring-boot-dependencies中的dependencies全部插入到本项目的dependencyManagement中,这样就不会被子项目自动继承。若没有此属性,则意思是将spring-boot-dependencies中的dependencies全部插入到本项目的dependencies中,子项目会自动继承