Stephane Nicoll da3b49e024 Polish contribution
Closes gh-3499
2016-02-16 09:31:50 +01:00

22 lines
885 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

= Spring Boot Couchbase Sample
This sample demonstrates how you can store a simple document using Spring Data Couchbase.
The sample expects couchbase to run on your machine with a bucket named `mybucket` and
`couchbase` for the password. You can customize these settings in `application.properties`.
Before you use the sample, you need _at least_ to create an `all` view for the `User`: go
to the Couchbase servers admin console and visit the Views screen, then click `Create
Development View` and name it `all` with `user` as document name. On that view, you need
to change the code to:
```java
function (doc, meta) {
if (doc._class == "sample.data.couchbase.User") {
emit(meta.id, null);
}
}
```
and the _reduce_ function to `_count`. After you've saved your changes go back to `Views`
and click on `Publish` so that the `all` view move to the `Production Views` tab.