Skip to content

Update Docs For Overriding Boot Dependencies #2564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions spring-kafka-docs/src/main/asciidoc/appendix.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
When using Spring for Apache Kafka in a Spring Boot application, the Apache Kafka dependency versions are determined by Spring Boot's dependency management.
If you wish to use a different version of `kafka-clients` or `kafka-streams`, and use the embedded kafka broker for testing, you need to override their version used by Spring Boot dependency management and add two `test` artifacts for Apache Kafka.

Or, to use a different Spring for Apache Kafka version with a supported Spring Boot version, set the `spring-kafka.version` property.
For example, {project-version} is supported by Spring Boot 2.7.x which brings in 2.8.x by default.

====
[source, xml, subs="+attributes", role="primary"]
.Maven
----
<properties>
<kafka.version>3.2.3</kafka.version>
<spring-kafka.version>{project-version}</spring-kafka.version>
</properties>

<dependency>
Expand All @@ -33,6 +37,7 @@ If you wish to use a different version of `kafka-clients` or `kafka-streams`, an
.Gradle
----
ext['kafka.version'] = '3.2.3'
ext['spring-kafka.version'] = '{project-version}'

dependencies {
implementation 'org.springframework.kafka:spring-kafka'
Expand Down