【问题标题】:Spring cloud vs. Spring platform BOMsSpring Cloud 与 Spring 平台 BOM
【发布时间】:2016-10-28 05:36:23
【问题描述】:

我有一些关于spring“材料清单”的依赖管理的问题:

  • 我应该同时使用这两者来进行完整的 Spring 依赖管理吗?
  • 它们不兼容吗?有什么问题吗?

我们的项目使用了几个由平台 BOM 管理的依赖项

【问题讨论】:

  • 两者都可以使用,但云 BOM 需要覆盖平台 BOM,因为它具有更新的依赖项。我稍后会发布文档中的示例。
  • @spencergibb 感谢您的评论和初学者文档中的提交。恕我直言,spring 平台 BOM 应该管理这些依赖项,否则更新软件包会让我们头疼。我们将通过 spring-boot 版本匹配两个 BOM,您是否推荐任何其他方法?

标签: spring spring-boot spring-cloud


【解决方案1】:

来自documentation

Spring Cloud Dependencies BOM 必须先行,这样它的 依赖项优先于 Spring IO 平台依赖项。

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>Brixton.SR1</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        <dependency>
            <groupId>io.spring.platform</groupId>
            <artifactId>platform-bom</artifactId>
            <version>2.0.5.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

was determined平台无法管理spring cloud的依赖。这是使用spring cloud的spring平台的推荐方式。

【讨论】:

    猜你喜欢
    • 2017-08-18
    • 1970-01-01
    • 1970-01-01
    • 2020-06-25
    • 2018-06-06
    • 2018-12-27
    • 1970-01-01
    • 1970-01-01
    • 2020-10-24
    相关资源
    最近更新 更多