parent和dependencyManagement

子模块中的pom使用parent,可以直接获得父pom中的依赖,不用自己写

但如果父pom中使用了dependencyManagement,那么子模块需要引入自己需要的依赖,只是不用写版本号,版本号由父pom控制

1
2
3
4
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

参考:

https://www.cnblogs.com/youzhibing/p/5427130.html

https://www.liaoxuefeng.com/wiki/1252599548343744/1309301243117601