
[英]Defaults used by Spring boot - spring-boot-starter-parent
[英]Does every spring boot application requires spring-boot-starter-parent
我开始使用Spring spring boot
并使用了Spring Boot inititlizr,并且看到包括父pom,例如:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.10.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
然后,我想拥有Spring web
,并添加了以下内容:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
我有以下问题:
问题1:每个spring boot应用程序是否必须将spring-boot-starter-parent
作为其父pom? 我们拥有多模块项目的情况如何?
问题2:对于特定类型的项目,例如Spring MVC / Sprint REST
,它添加了spring-boot-starter-web
。 那么这是否增加了真正的依赖关系呢? 如果是这样,那为什么我们需要spring-boot-starter-parent
呢?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.