You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/asciidoc/configuration.adoc
+60-1
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ This chapter describes the common installation and configuration steps needed wh
9
9
All versions intended for production use are distributed across Maven Central and the Spring release repository.
10
10
As a result, the library can be included like any other maven dependency:
11
11
12
+
== Configuration
12
13
.Including the dependency through maven
13
14
====
14
15
[source,xml,subs="+attributes"]
@@ -26,6 +27,8 @@ This will pull in several dependencies, including the underlying Couchbase Java
26
27
You can also grab snapshots from the https://repo.spring.io/ui/repos/tree/General/snapshot/org/springframework/data/spring-data-couchbase[spring snapshot repository] ( \https://repo.spring.io/snapshot ) and milestone releases from the https://repo.spring.io/ui/repos/tree/General/milestone/org/springframework/data/spring-data-couchbase[spring milestone repository] ( \https://repo.spring.io/milestone ).
27
28
Here is an example on how to use the current SNAPSHOT dependency:
28
29
30
+
== Snapshot Configuration
31
+
29
32
.Using a snapshot version
30
33
====
31
34
[source,xml]
@@ -44,7 +47,7 @@ Here is an example on how to use the current SNAPSHOT dependency:
44
47
----
45
48
====
46
49
47
-
.Overriding the Couchbase SDK Version
50
+
== Overriding the Couchbase SDK Version
48
51
49
52
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
53
@@ -165,3 +168,59 @@ If you start your application, you should see Couchbase INFO level logging in th
165
168
Couchbase Java SDK is connecting to the database. If any errors are reported, make sure that the given credentials
166
169
and host information are correct.
167
170
171
+
172
+
== Configuring Multiple Buckets
173
+
174
+
To leverage multi-bucket repositories, implement the methods below in your Config class. The config*OperationsMapping methods configure the mapping of entity-objects to buckets. Be careful with the method names - using a method name that is a Bean will result in the value of that bean being used instead of the result of the method.
175
+
176
+
This example maps Person -> protected, User -> mybucket, and everything else goes to getBucketName(). Note that this only maps calls through the Repository.
177
+
178
+
====
179
+
[source,java]
180
+
----
181
+
@Override
182
+
public void configureReactiveRepositoryOperationsMapping(ReactiveRepositoryOperationsMapping baseMapping) {
0 commit comments