【发布时间】:2018-04-09 14:12:40
【问题描述】:
Spring 文档Using Spring Boot without the parent POM 显示对spring-boot-dependencies 的依赖已添加到dependencyManagement 部分。这真的正确吗?
spring-boot-dependencies 为所有依赖项指定版本属性。但是,这些属性在使用 spring-boot-dependencies 的 POM 中不可用。大概是因为spring-boot-dependencies在dependencyManagement中。
spring-boot-dependencies 仅包括 dependencyManagement 和 pluginManagement。所以似乎可以将spring-boot-dependencies 包含为依赖项(而不是dependencyManagement)而不添加不必要的依赖项。
那么为什么spring-boot-dependencies 会被包含为dependencyManagement?
【问题讨论】:
-
我问这个问题是因为我想使用来自
spring-boot-dependencies的${jersey.version}。从那时起,我在文档中看到,属性仅在使用 spring starter POM 作为父级时可用。
标签: maven spring-boot dependencies dependency-management