You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2f815a907a
Update the existing tests to use the relocated `spring-boot-test` classes. Restructuring was achieved using the following command: find . -type f -name '*.java' -exec sed -i '' \ -e s/org.springframework.boot.test.ConfigFileApplicationContextInitializer/\ org.springframework.boot.test.context.ConfigFileApplicationContextInitializer/g \ -e s/org.springframework.boot.test.EnvironmentTestUtils/\ org.springframework.boot.test.util.EnvironmentTestUtils/g \ -e s/org.springframework.boot.test.IntegrationTest/\ org.springframework.boot.test.context.IntegrationTest/g \ -e s/org.springframework.boot.test.IntegrationTestPropertiesListener/\ org.springframework.boot.test.context.IntegrationTestPropertiesListener/g \ -e s/org.springframework.boot.test.OutputCapture/\ org.springframework.boot.test.rule.OutputCapture/g \ -e s/org.springframework.boot.test.SpringApplicationConfiguration/\ org.springframework.boot.test.context.SpringApplicationConfiguration/g \ -e s/org.springframework.boot.test.SpringApplicationContextLoader/\ org.springframework.boot.test.context.SpringApplicationContextLoader/g \ -e s/org.springframework.boot.test.SpringBootMockServletContext/\ org.springframework.boot.test.mock.web.SpringBootMockServletContext/g \ -e s/org.springframework.boot.test.TestRestTemplate/\ org.springframework.boot.test.web.client.TestRestTemplate/g \ -e s/org.springframework.boot.test.WebIntegrationTest/\ org.springframework.boot.test.context.web.WebIntegrationTest/g {} \; See gh-5293 |
9 years ago | |
---|---|---|
.. | ||
src | 9 years ago | |
README.adoc | 9 years ago | |
pom.xml | 9 years ago |
README.adoc
= 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 `default` and
no password. You can customize these settings in `application.properties`.
This sample also configures the `auto-index` property and the `UserRepository` defines
the `all` view so you should be able to invoke `findAll` for this sample.
== Creating the view manually
If you don't want to rely on `auto-index` and better understand how this works behind the
scenes, you need to create an `all` view for the `User`. Go to the Couchbase server’s
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.