Override default consistency for Couchbase

Spring Data Couchbase 2.0 sets the default consistency to "update-after"
which is good for performance reason but can be quite confusing. Since
the team has decided to switch to "read-your-own-writes" in 2.1, Spring
Boot already offers the improved default right now.

This commit exposes an additional property that can be used to change
the Couchbase's default consistency.

Closes gh-5159
This commit is contained in:
Stephane Nicoll
2016-02-16 14:28:09 +01:00
parent 81fdc99fb0
commit ff5b05fed9
4 changed files with 30 additions and 0 deletions

View File

@@ -493,6 +493,7 @@ content into your application; rather pick only the properties that you need.
spring.data.couchbase.bootstrap-hosts=localhost # Couchbase nodes (host or IP address) to bootstrap from.
spring.data.couchbase.bucket.name= # Name of the bucket to connect to.
spring.data.couchbase.bucket.password= # Password of the bucket.
spring.data.couchbase.consistency=read-your-own-writes # Consistency to apply by default on generated queries.
# ELASTICSEARCH ({sc-spring-boot-autoconfigure}/elasticsearch/ElasticsearchProperties.{sc-ext}[ElasticsearchProperties])
spring.data.elasticsearch.cluster-name=elasticsearch # Elasticsearch cluster name.