You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

咨询:Spring Integration Kafka是否有可用的BOM依赖?

Spring Integration Kafka BOM for Gradle Dependency Management

Great question! You're right that in older versions of Spring Integration (like the one paired with Spring Boot 2.0.1.RELEASE), spring-integration-kafka isn't included in the core Spring Integration BOM. That said, there is a dedicated BOM for Spring Integration Kafka that you can import to avoid manually specifying versions.

Here's how to update your Gradle configuration:

First, add the Spring Integration Kafka BOM to your dependencyManagement imports. Make sure the BOM version matches the one compatible with your Spring Boot version—for Spring Boot 2.0.1.RELEASE, the corresponding Spring Integration Kafka version is 2.0.1.RELEASE:

plugins {
    id 'org.springframework.boot' version '2.0.1.RELEASE'
    id 'io.spring.dependency-management' version '1.0.5.RELEASE'
}

dependencyManagement {
    imports {
        // Import the Spring Integration Kafka BOM
        mavenBom 'org.springframework.integration:spring-integration-kafka-bom:2.0.1.RELEASE'
    }
}

dependencies {
    // Now you can declare the dependency without a version
    implementation 'org.springframework.integration:spring-integration-kafka'
}

A quick note on version compatibility:

If you're unsure which BOM version to use, check the Spring Boot official documentation for the compatible Spring Integration Kafka version paired with your Spring Boot release. This ensures all your integration components work together seamlessly.

If no BOM is available (though unlikely here):

In rare cases where a dedicated BOM doesn't exist, you could also explicitly define the version in the dependencyManagement block instead:

dependencyManagement {
    dependencies {
        dependency 'org.springframework.integration:spring-integration-kafka:2.0.1.RELEASE'
    }
}

But using the BOM is the cleaner approach as it centralizes version control for all related Kafka integration artifacts.

内容的提问来源于stack exchange,提问作者mrusinak

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 03:37:24