gpt4 book ai didi

spring-boot - 需要知道spring-boot-starter-parent和spring-boot-parent的区别

转载 作者:行者123 更新时间:2023-12-03 19:26:59 44 4
gpt4 key购买 nike

有人可以解释一下 spring-boot-parent 和 spring-boot-starter-parent 之间的区别吗,正如我在下面附加的 GIT HUB 代码链接之一中看到的,他们为 spring-boot-starter-parent 编写了单独的模块和spring-boot-parent。

https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/

如果有人知道这两个依赖项之间的区别,请告诉我,同样在大多数项目中,我们通常使用 spring-boot-starter-parent 作为父级,而不是 spring-boot-parent 当它们共享相同的父级时 spring-引导依赖项。

https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/

最佳答案

https://www.baeldung.com/spring-boot-starter-parent 中所述
spring-boot-starter-parent

The spring-boot-starter-parent project is a special starter project –that provides default configurations for our application and acomplete dependency tree to quickly build our Spring Boot project.

It also provides default configuration for Maven plugins such asmaven-failsafe-plugin, maven-jar-plugin, maven-surefire-plugin,maven-war-plugin.

Beyond that, it also inherits dependency management fromspring-boot-dependencies which is the parent to thespring-boot-starter-parent.


Spring 引导父

Sometimes we have a custom Maven parent. Or, we may prefer to declareall our Maven configurations manually.

In that case, we may opt to not use the spring-boot-starter-parentproject. But, we can still benefit from its dependency tree by addinga dependency spring-boot-dependencies in our project in import scope.

关于spring-boot - 需要知道spring-boot-starter-parent和spring-boot-parent的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56955525/

44 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com