[Docs] Add boot version override appendix (#410)

This commit is contained in:
Chris Bono
2023-06-04 21:28:21 -05:00
committed by GitHub
parent 60dac79c3d
commit 478bee2abb
2 changed files with 42 additions and 0 deletions

View File

@@ -44,6 +44,8 @@ In addition to this reference documentation, we recommend a number of other reso
include::version-compatibility.adoc[leveloffset=+2]
include::override-boot-dependencies.adoc[leveloffset=+2]
include::non-ga-versions.adoc[leveloffset=+2]
include::native-image.adoc[leveloffset=+2]

View File

@@ -0,0 +1,40 @@
[appendix]
[[appendix.override-boot-deps]]
= Override Spring Boot Dependencies
When using Spring for Apache Pulsar in a Spring Boot application, the Apache Pulsar dependency versions are determined by Spring Boot's dependency management.
If you wish to use a different version of `pulsar-client-all` or `pulsar-client-reactive-adapter`, you need to override their version used by Spring Boot dependency management; set the `pulsar.version` or `pulsar-reactive.version` property, respectively.
Or, to use a different Spring for Apache Pulsar version with a supported Spring Boot version, set the `spring-pulsar.version` property.
In the following example, snapshot version of the Pulsar clients and Spring Pulsar are being used.
====
[source, groovy, subs="+attributes", role="secondary"]
.Gradle
----
ext['pulsar.version'] = '3.0.1-SNAPSHOT'
ext['pulsar-reactive.version'] = '0.3.1-SNAPSHOT'
ext['spring-pulsar.version'] = '1.0.1-SNAPSHOT'
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-pulsar-reactive'
}
----
[source, xml, subs="+attributes", role="primary"]
.Maven
----
<properties>
<pulsar.version>3.0.1-SNAPSHOT</pulsar.version>
<pulsar-reactive.version>0.3.1-SNAPSHOT</pulsar-reactive.version>
<spring-pulsar.version>1.0.1-SNAPSHOT</spring-pulsar.version>
</properties>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-pulsar-reactive</artifactId>
</dependency>
----
====