This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


The following commit(s) were added to refs/heads/main by this push:
     new e6c49ebaca71 Add documentation for setting Pulsar client version in 
Spring Boot
e6c49ebaca71 is described below

commit e6c49ebaca7126fa94ed8c3fd90c31fe8e53bb48
Author: Lari Hotari <[email protected]>
AuthorDate: Thu Oct 24 00:10:18 2024 +0300

    Add documentation for setting Pulsar client version in Spring Boot
    
    - 4.0.x version docs
---
 .../version-4.0.x/client-libraries-java-setup.md   | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/versioned_docs/version-4.0.x/client-libraries-java-setup.md 
b/versioned_docs/version-4.0.x/client-libraries-java-setup.md
index 2086c771820a..35200cd41fa4 100644
--- a/versioned_docs/version-4.0.x/client-libraries-java-setup.md
+++ b/versioned_docs/version-4.0.x/client-libraries-java-setup.md
@@ -79,6 +79,12 @@ If you use Maven, add the following information to the 
`pom.xml` file.
 
 If you use Gradle, add the following information to the `build.gradle` file.
 
+:::note
+
+Please notice that when using Spring Boot and the default Gradle  build with 
the Spring Dependency Management plugin (`io.spring.dependency-management`), it 
is necessary to use Spring Dependency Management plugin features to configure 
the Pulsar version. Please refer to the next section for more details.
+
+:::
+
 ```groovy
 def pulsarVersion = '@pulsar:version@'
 
@@ -87,8 +93,27 @@ dependencies {
   implementation 'org.apache.pulsar:pulsar-client'
 }
 ```
+
 Note that the version is number for the `pulsar-client` dependency is now 
omitted as the Pulsar BOM dictates which version is used.
 
+#### Gradle with Spring Boot, using Spring Dependency Management plugin
+
+Please notice that when using the Spring Dependency Management plugin 
(`io.spring.dependency-management`) in Gradle, it is necessary to use Spring 
Dependency Management plugin features to configure the Pulsar version.
+The Spring Boot [Dependency Version 
properties](https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-dependency-versions.html)
 define `pulsar.version` and `pulsar-reactive.version` for controlling the 
Pulsar Java client version and Pulsar Reactive client version.
+
+To use a specific Pulsar version for the Pulsar Java client in a Spring Boot 
application using Gradle, add the following to your `build.gradle` file in a 
Spring Boot project:
+
+```groovy
+ext['pulsar.version'] = '@pulsar:version@'
+
+// The Pulsar Java client will be automatically added to dependencies as a 
transitive dependency of the spring-boot-starter-pulsar dependency
+dependencies {
+  implementation 'org.springframework.boot:spring-boot-starter-pulsar'
+}
+```
+
+You can find more information about Spring Pulsar in the [Spring for Apache 
Pulsar documentation](https://spring.io/projects/spring-pulsar).
+
 ## Step 2: Connect to Pulsar cluster
 
 To connect to Pulsar using client libraries, you need to specify a [Pulsar 
protocol](developing-binary-protocol.md) URL.

Reply via email to