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 1134472a6e7b Add documentation for setting Pulsar client version in 
Spring Boot
1134472a6e7b is described below

commit 1134472a6e7bf3668cd07b41c354145a73663557
Author: Lari Hotari <[email protected]>
AuthorDate: Wed Oct 23 23:50:34 2024 +0300

    Add documentation for setting Pulsar client version in Spring Boot
---
 docs/client-libraries-java-setup.md                | 25 ++++++++++++++++++++
 .../version-3.2.x/client-libraries-java-setup.md   | 27 +++++++++++++++++++++-
 .../version-3.3.x/client-libraries-java-setup.md   | 27 +++++++++++++++++++++-
 3 files changed, 77 insertions(+), 2 deletions(-)

diff --git a/docs/client-libraries-java-setup.md 
b/docs/client-libraries-java-setup.md
index 2086c771820a..35200cd41fa4 100644
--- a/docs/client-libraries-java-setup.md
+++ b/docs/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.
diff --git a/versioned_docs/version-3.2.x/client-libraries-java-setup.md 
b/versioned_docs/version-3.2.x/client-libraries-java-setup.md
index 6f6acc40c40a..35200cd41fa4 100644
--- a/versioned_docs/version-3.2.x/client-libraries-java-setup.md
+++ b/versioned_docs/version-3.2.x/client-libraries-java-setup.md
@@ -42,7 +42,7 @@ If you use Gradle, add the following information to the 
`build.gradle` file.
 def pulsarVersion = '@pulsar:version@'
 
 dependencies {
-    implementation "org.apache.pulsar:pulsar-client:${pulsarVersion}"
+       implementation "org.apache.pulsar:pulsar-client:${pulsarVersion}"
 }
 ```
 
@@ -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.
diff --git a/versioned_docs/version-3.3.x/client-libraries-java-setup.md 
b/versioned_docs/version-3.3.x/client-libraries-java-setup.md
index 6f6acc40c40a..35200cd41fa4 100644
--- a/versioned_docs/version-3.3.x/client-libraries-java-setup.md
+++ b/versioned_docs/version-3.3.x/client-libraries-java-setup.md
@@ -42,7 +42,7 @@ If you use Gradle, add the following information to the 
`build.gradle` file.
 def pulsarVersion = '@pulsar:version@'
 
 dependencies {
-    implementation "org.apache.pulsar:pulsar-client:${pulsarVersion}"
+       implementation "org.apache.pulsar:pulsar-client:${pulsarVersion}"
 }
 ```
 
@@ -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