Skip to content

Commit 046091a

Browse files
authored
Add Doc to Change Couchbase SDK Version. (#1783)
Closes #1781.
1 parent 8d248b2 commit 046091a

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

src/main/asciidoc/configuration.adoc

+58
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,64 @@ Here is an example on how to use the current SNAPSHOT dependency:
4444
----
4545
====
4646

47+
.Overriding the Couchbase SDK Version
48+
49+
Some users may wish to use a Couchbase Java SDK version different from the one referenced in a Spring Data Couchbase release for the purpose of obtaining bug and vulnerability fixes. Since Couchbase Java SDK minor version releases are backwards compatible, this version of Spring Data Couchbase is compatible and supported with any 3.x version of the Couchbase Java SDK newer than the one specified in the release dependencies. To change the Couchbase Java SDK version used by Spring Data Couchbase, simply override the dependency in the application pom.xml as follows:
50+
51+
.If Using the spring-data-couchbase Dependency Directly
52+
====
53+
[source,xml]
54+
----
55+
<dependency>
56+
<groupId>org.springframework.data</groupId>
57+
<artifactId>spring-data-couchbase</artifactId>
58+
<version>${version}</version>
59+
<exclusions> <!-- exclude Couchbase Java SDK -->
60+
<exclusion>
61+
<groupId>com.couchbase.client</groupId>
62+
<artifactId>java-client</artifactId>
63+
</exclusion>
64+
</exclusions>
65+
</dependency>
66+
67+
<dependency> <!-- add dependency for specific Couchbase Java SDK version -->
68+
<groupId>com.couchbase.client</groupId>
69+
<artifactId>java-client</artifactId>
70+
<version>3.4.7</version>
71+
</dependency>
72+
----
73+
====
74+
75+
.If Using the spring-data-starter-couchbase Dependency (from Spring Initialzr)
76+
====
77+
[source,xml]
78+
----
79+
<parent>
80+
<groupId>org.springframework.boot</groupId>
81+
<artifactId>spring-boot-starter-parent</artifactId>
82+
<version>x.y.z</version>
83+
<relativePath/>
84+
</parent>
85+
86+
<dependency>
87+
<groupId>org.springframework.boot</groupId>
88+
<artifactId>spring-boot-starter-data-couchbase</artifactId>
89+
<exclusions> <!-- exclude Couchbase Java SDK -->
90+
<exclusion>
91+
<groupId>com.couchbase.client</groupId>
92+
<artifactId>java-client</artifactId>
93+
</exclusion>
94+
</exclusions>
95+
</dependency>
96+
97+
<dependency> <!-- add dependency for specific Couchbase Java SDK version -->
98+
<groupId>com.couchbase.client</groupId>
99+
<artifactId>java-client</artifactId>
100+
<version>3.4.7</version>
101+
</dependency>
102+
----
103+
====
104+
47105
Once you have all needed dependencies on the classpath, you can start configuring it.
48106
Only Java config is supported (XML config has been removed in 4.0).
49107

0 commit comments

Comments
 (0)