Skip to content

Commit 29c80a5

Browse files
authored
Update Docs For Overriding Boot Dependencies (#2564)
1 parent 397da7d commit 29c80a5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spring-kafka-docs/src/main/asciidoc/appendix.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
44
When using Spring for Apache Kafka in a Spring Boot application, the Apache Kafka dependency versions are determined by Spring Boot's dependency management.
55
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.
66

7+
Or, to use a different Spring for Apache Kafka version with a supported Spring Boot version, set the `spring-kafka.version` property.
8+
For example, {project-version} is supported by Spring Boot 2.7.x which brings in 2.8.x by default.
9+
710
====
811
[source, xml, subs="+attributes", role="primary"]
912
.Maven
1013
----
1114
<properties>
1215
<kafka.version>3.2.3</kafka.version>
16+
<spring-kafka.version>{project-version}</spring-kafka.version>
1317
</properties>
1418
1519
<dependency>
@@ -33,6 +37,7 @@ If you wish to use a different version of `kafka-clients` or `kafka-streams`, an
3337
.Gradle
3438
----
3539
ext['kafka.version'] = '3.2.3'
40+
ext['spring-kafka.version'] = '{project-version}'
3641
3742
dependencies {
3843
implementation 'org.springframework.kafka:spring-kafka'

0 commit comments

Comments
 (0)