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: README.adoc
+11-12Lines changed: 11 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,3 @@
1
-
image:https://spring.io/badges/spring-data-couchbase/ga.svg[Spring Data Couchbase,link=https://projects.spring.io/spring-data-couchbase#quick-start] image:https://spring.io/badges/spring-data-couchbase/snapshot.svg[Spring Data Couchbase,link=https://projects.spring.io/spring-data-couchbase#quick-start]
2
-
3
1
= Spring Data Couchbase image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-couchbase%2Fmain&subject=Build[link=https://jenkins.spring.io/view/SpringData/job/spring-data-couchbase/] https://gitter.im/spring-projects/spring-data[image:https://badges.gitter.im/spring-projects/spring-data.svg[Gitter]]
4
2
5
3
The primary goal of the https://www.springsource.org/spring-data[Spring Data] project is to make it easier to build
@@ -32,16 +30,15 @@ This project is lead and maintained by Couchbase, Inc.
32
30
33
31
== Version compatibility
34
32
35
-
`Spring-Data Couchbase 3.0.x` is the Spring Data connector for the `Couchbase Java SDK 2.x` generation.
33
+
`Spring-Data Couchbase` is the Spring Data connector for the `Couchbase Java SDK 2.x` generation.
36
34
37
-
Both the SDK and this Spring Data community project are major version changes with lots of differences from their
38
-
respective previous versions.
35
+
Both the SDK and this Spring Data community project are major version changes with lots of differences from their respective previous versions.
39
36
40
37
Notably, this version is compatible with `Couchbase Server 4.0`, bringing support for the `N1QL` query language.
41
38
42
39
== Code of Conduct
43
40
44
-
This project is governed by the https://github.com/spring-projects/.github/blob/e3cc2ff230d8f1dca06535aa6b5a4a23815861d4/CODE_OF_CONDUCT.md[Spring Code of Conduct].By participating, you are expected to uphold this code of conduct.Please report unacceptable behavior to [email protected].
41
+
This project is governed by the https://github.com/spring-projects/.github/blob/e3cc2ff230d8f1dca06535aa6b5a4a23815861d4/CODE_OF_CONDUCT.md[Spring Code of Conduct].By participating, you are expected to uphold this code of conduct.Please report unacceptable behavior to [email protected].
45
42
46
43
== Getting Started
47
44
@@ -144,14 +141,16 @@ You can also chat with the community on https://gitter.im/spring-projects/spring
144
141
145
142
== Reporting Issues
146
143
147
-
Spring Data uses JIRA as issue tracking system to record bugs and feature requests. If you want to raise an issue, please follow the recommendations below:
144
+
Spring Data uses GitHub as issue tracking system to record bugs and feature requests.
145
+
If you want to raise an issue, please follow the recommendations below:
148
146
149
147
* Before you log a bug, please search the
150
148
https://github.com/spring-projects/spring-data-couchbase/issues[issue tracker] to see if someone has already reported the problem.
151
-
* If the issue doesn’t already exist, https://github.com/spring-projects/spring-data-couchbase/issues/new[create a new issue].
149
+
* If the issue does not already exist, https://github.com/spring-projects/spring-data-couchbase/issues/new[create a new issue].
152
150
* Please provide as much information as possible with the issue report, we like to know the version of Spring Data that you are using and JVM version.
153
-
* If you need to paste code, or include a stack trace use JIRA `{code}…{code}` escapes before and after your text.
154
-
* If possible try to create a test-case or project that replicates the issue. Attach a link to your code or a compressed file containing your code.
151
+
* If you need to paste code, or include a stack trace use Markdown +++```+++ escapes before and after your text.
152
+
* If possible try to create a test-case or project that replicates the issue.
153
+
Attach a link to your code or a compressed file containing your code.
155
154
156
155
== Building from Source
157
156
@@ -173,10 +172,10 @@ Building the documentation builds also the project without running tests.
173
172
174
173
[source,bash]
175
174
----
176
-
$ ./mvnw clean install -Pdistribute
175
+
$ ./mvnw clean install -Pantora
177
176
----
178
177
179
-
The generated documentation is available from `target/site/reference/html/index.html`.
178
+
The generated documentation is available from `target/antora/site/index.html`.
180
179
181
180
=== Building and staging reference documentation for review
Copy file name to clipboardExpand all lines: src/main/antora/modules/ROOT/pages/commons/migrating.adoc
+19-15Lines changed: 19 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -12,45 +12,48 @@ Since the main objective was to migrate from the Java SDK 2 to 3, configuration
12
12
13
13
IMPORTANT: XML Configuration support has been dropped, so only java/annotation based configuration is supported.
14
14
15
-
Your configuration still has to extend the `AbstractCouchbaseConfiguration`, but since RBAC (role-based access control) is now mandatory, different properties need to be overridden in order to be configured: `getConnectionString`, `getUserName`, `getPassword` and `getBucketName`.If you want to use a non-default scope optionally you can override the `getScopeName` method.Note that if you want to use certificate based authentication or you need to customize the password authentication, the `authenticator` method can be overridden to perform this task.
15
+
Your configuration still has to extend the `AbstractCouchbaseConfiguration`, but since RBAC (role-based access control) is now mandatory, different properties need to be overridden in order to be configured: `getConnectionString`, `getUserName`, `getPassword` and `getBucketName`.If you want to use a non-default scope optionally you can override the `getScopeName` method.Note that if you want to use certificate based authentication or you need to customize the password authentication, the `authenticator` method can be overridden to perform this task.
16
16
17
17
The new SDK still has an environment that is used to configure it, so you can override the `configureEnvironment` method and supply custom configuration if needed.
18
18
19
-
For more information, see <<couchbase.configuration>>.
19
+
For more information, see xref:couchbase/configuration.adoc[Installation & Configuration].
20
20
21
+
[[spring-boot-version-compatibility]]
21
22
=== Spring Boot Version Compatibility
22
23
23
-
Spring Boot 2.3.x or higher depends on Spring Data Couchbase 4.x.Earlier versions of Couchbase are not available because SDK 2 and 3 cannot live on the same classpath.
24
+
Spring Boot 2.3.x or higher depends on Spring Data Couchbase 4.x.Earlier versions of Couchbase are not available because SDK 2 and 3 cannot live on the same classpath.
24
25
25
26
[[couchbase.migrating.entities]]
26
27
27
28
29
+
[[entities]]
28
30
== Entities
29
31
How to deal with entities has not changed, although since the SDK now does not ship annotations anymore only Spring-Data related annotations are supported.
30
32
31
33
Specifically:
32
34
33
-
- `com.couchbase.client.java.repository.annotation.Id` became `import org.springframework.data.annotation.Id`
34
-
- `com.couchbase.client.java.repository.annotation.Field` became `import org.springframework.data.couchbase.core.mapping.Field`
35
+
- `com.couchbase.client.java.repository.annotation.Id` became `import org.springframework.data.annotation.Id`
36
+
- `com.couchbase.client.java.repository.annotation.Field` became `import org.springframework.data.couchbase.core.mapping.Field`
35
37
36
38
The `org.springframework.data.couchbase.core.mapping.Document` annotation stayed the same.
37
39
38
-
For more information, see <<couchbase.entity>>.
40
+
For more information, see xref:couchbase/entity.adoc[Modeling Entities].
39
41
40
42
41
43
[[couchbase.migrating.indexes]]
42
44
== Automatic Index Management
43
45
44
-
Automatic Index Management has been redesigned to allow more flexible indexing. New annotations have been introduced and old ones like `@ViewIndexed`, `@N1qlSecondaryIndexed` and `@N1qlPrimaryIndexed` were removed.
46
+
Automatic Index Management has been redesigned to allow more flexible indexing.
47
+
New annotations have been introduced and old ones like `@ViewIndexed`, `@N1qlSecondaryIndexed` and `@N1qlPrimaryIndexed` were removed.
45
48
46
-
For more information, see <<couchbase.repository.indexing>>.
49
+
For more information, see xref:couchbase/repository.adoc#couchbase.repository.indexing[Automatic Index Management].
47
50
48
51
[[couchbase.migrating.template]]
49
52
== Template and ReactiveTemplate
50
53
51
54
Since the Couchbase SDK 3 removes support for `RxJava` and instead adds support for `Reactor`, both the `couchbaseTemplate` as well as the `reactiveCouchbaseTemplate` can be directly accessed from the `AbstractCouchbaseConfiguration`.
52
55
53
-
The template has been completely overhauled so that it now uses a fluent API to configure instead of many method overloads.This has the advantage that in the future we are able to extend the functionality without having to introduce more and more overloads that make it complicated to navigate.
56
+
The template has been completely overhauled so that it now uses a fluent API to configure instead of many method overloads.This has the advantage that in the future we are able to extend the functionality without having to introduce more and more overloads that make it complicated to navigate.
54
57
55
58
The following table describes the method names in 3.x and compares them to their 4.x equivalents:
56
59
@@ -113,14 +116,14 @@ In addition, the following methods have been added which were not available in 3
113
116
114
117
We tried to unify and align the APIs more closely to the underlying SDK semantics so they are easier to correlate and navigate.
115
118
116
-
For more information, see <<couchbase.template>>.
119
+
For more information, see xref:couchbase/template.adoc[Template & direct operations].
117
120
118
121
[[couchbase.migrating.repository]]
119
122
== Repositories & Queries
120
123
121
-
- `org.springframework.data.couchbase.core.query.Query` became `org.springframework.data.couchbase.repository.Query`
122
-
- `org.springframework.data.couchbase.repository.ReactiveCouchbaseSortingRepository` has been removed.Consider extending `ReactiveSortingRepository` or `ReactiveCouchbaseRepository`
123
-
- `org.springframework.data.couchbase.repository.CouchbasePagingAndSortingRepository` has been removed.Consider extending `PagingAndSortingRepository` or `CouchbaseRepository`
124
+
- `org.springframework.data.couchbase.core.query.Query` became `org.springframework.data.couchbase.repository.Query`
125
+
- `org.springframework.data.couchbase.repository.ReactiveCouchbaseSortingRepository` has been removed.Consider extending `ReactiveSortingRepository` or `ReactiveCouchbaseRepository`
126
+
- `org.springframework.data.couchbase.repository.CouchbasePagingAndSortingRepository` has been removed.Consider extending `PagingAndSortingRepository` or `CouchbaseRepository`
124
127
125
128
126
129
IMPORTANT: Support for views has been removed and N1QL queries are now the first-class citizens for all custom repository methods as well as the built-in ones by default.
@@ -151,9 +154,10 @@ public class MyService {
151
154
----
152
155
====
153
156
154
-
See <<couchbase.repository>> for more information.
157
+
See xref:couchbase/repository.adoc[Couchbase repositories] for more information.
155
158
156
159
160
+
[[full-text-search-fts]]
157
161
== Full Text Search (FTS)
158
162
159
163
The FTS API has been simplified and now can be accessed via the `Cluster` class:
@@ -193,4 +197,4 @@ public class MyService {
193
197
----
194
198
====
195
199
196
-
See link:https://docs.couchbase.com/java-sdk/current/howtos/full-text-searching-with-sdk.html[the FTS Documentation] for more information.
200
+
See link:https://docs.couchbase.com/java-sdk/current/howtos/full-text-searching-with-sdk.html[the FTS Documentation] for more information.
Spring Data support for Couchbase contains a wide range of features:
6
+
7
+
* Spring configuration support with xref:couchbase/configuration.adoc[Java-based `@Configuration` classes].
8
+
* The xref:couchbase/template.adoc[`CouchbaseTemplate` and `ReactiveCouchbaseTemplate`] helper classes that provide object mapping between Couchbase collections and POJOs.
9
+
* xref:couchbase/template.adoc#exception-translation[Exception translation] into Spring's portable {spring-data-commons-docs-url}data-access.html#dao-exceptions[Data Access Exception Hierarchy].
10
+
* Feature rich object mapping integrated with _Spring's_ {spring-data-commons-docs-url}core.html#core-convert[Conversion Service].
11
+
* Annotation-based mapping metadata that is extensible to support other metadata formats.
12
+
* Automatic implementation of xref:repositories.adoc[imperative and reactive `Repository` interfaces] including support for xref:repositories/custom-implementations.adoc[custom query methods].
13
+
14
+
For most data-oriented tasks, you can use the `[Reactive]CouchbaseTemplate` or the `Repository` support, both of which use the rich object-mapping functionality.
15
+
Spring Data Couchbase uses consistent naming conventions on objects in various APIs to those found in the Couchbase Java SDK so that they are familiar and so that you can map your existing knowledge onto the Spring APIs.
0 commit comments