我对Maven和JVM还是比较陌生,并且很好奇Spring的发行方法实际上是如何工作的?什么是BOM?

例如,Spring Cloud页面显示Use your dependency management tools to control the version. If you are using Maven remember that the first version declared wins, so declare the BOMs in order, with the first one usually being the most recent (e.g. if you want to use Spring Boot 1.3.6 with Brixton.RELEASE, put the Boot BOM first).

有人可以举例说明这在实践中意味着什么吗?

最佳答案

您检测到Dependency Management的Maven概念。 Maven文档很好地说明了这一概念。您还将在Maven文档中找到有关物料清单(BOM)的信息。

简而言之,BOM定义了相关性(具有版本),导入此BOM的项目将从BOM中获取其所依赖的非标物的版本信息。因此,BOM可以确保将一组依赖项与彼此“兼容”的版本一起使用。

09-20 19:55