Tag Archives: Couchbase Spring Boot Configuration Properties

Couchbase Spring Boot Properties


Couchbase is a provider of Spring Boot for handling NoSQL database operations through JSON. Couchbase is NoSQL document oriented distributed database over the cloud or on- premises which perform transactions by JSON and provide unmatched versatility, performance and scalability. To use Couchbase in your Spring boot application you have to add this Couchbase starter in your pom.xml .

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-couchbase</artifactId>
    <version>2.6.3</version>
</dependency>

After adding Couchbase Database starter in your application it will automatically download and add the required dependencies in your application and initialize with default values. You can overwrite these values through application.properties / application.yaml .

Data Couchbase Configuration Properties

Spring Boot load these properties in CouchbaseDataProperties class.

NameDefault ValueDescription
spring.data.couchbase.auto-indexfalsecreate views and indexes automatically.
spring.data.couchbase.consistencyread-your-own-writesBy default Consistency to apply on generated queries.
spring.data.couchbase.repositories.enabledtrueEnable Couchbase repositories.
Data Couch Spring Boot properties

Couchbase Configuration Properties

Spring Boot load these properties in CouchbaseProperties class.

NameDefault ValueDescription
spring.couchbase.bootstrap-hosts Couchbase nodes host/IP address to bootstrap from.
spring.couchbase.bucket.namedefaultbucket name connect to.
spring.couchbase.bucket.password bucket password.
spring.couchbase.env.endpoints.key-value1Number of sockets per node for each Key/value service.
spring.couchbase.env.endpoints.query1Number of sockets per node for each Query (N1QL) service.
spring.couchbase.env.endpoints.view1Number of sockets per node for each view service.
spring.couchbase.env.ssl.enabled Enable SSL support. Enabled automatically if a “keyStore” is provided otherwise specified otherwise.
spring.couchbase.env.ssl.key-store Path to JVM key store which holds the certificates.
spring.couchbase.env.ssl.key-store-password Password used to access the key store.
spring.couchbase.env.timeouts.connect5000Bucket connections timeout. (in milliseconds)
spring.couchbase.env.timeouts.key-value2500Blocking operations performed on a key timeout.( in milliseconds)
spring.couchbase.env.timeouts.query7500N1QL query operations timeout.( in milliseconds)
spring.couchbase.env.timeouts.socket-connect1000Socket connect connections timeout.( in milliseconds).
spring.couchbase.env.timeouts.view7500Regular and geospatial view operations timeout. (in milliseconds).
Couchbase Spring Boot Properties

References

https://docs.spring.io/spring-boot/docs/1.4.x/reference/html/common-application-properties.html

Happy Learning !!!