DEV Community

loizenai
loizenai

Posted on

Couchbase – How to create Spring JPA Couchbase application with SpringBoot

https://grokonez.com/spring-framework/spring-data/couchbase-create-spring-jpa-couchbase-application-springboot

Couchbase server is an open source, distributed multi-model NoSQL document-oriented database. So in the tutorial, JavaSampleApproach will show you how to create a Spring JPA Couchbase with SpringBoot.

Related posts:

I. Technologies

– Java 1.8
– Maven 3.3.9
– Spring Tool Suite – Version 3.8.1.RELEASE
– Spring Boot: 1.5.6RELEASE

  • Couchbase 4.6.2

    II. SpringBoot & Couchbase

    Spring Boot provides auto-configuration for Couchbase and abstractions on top of it by Spring Data Couchbase. We can use it easily via spring-boot-starter-data-couchbase 'Starter' which had collected the needed dependencies.

Spring JPA Couchbase - SpringBoot - Architecture

For connecting with Couchbase Bucket and Cluster, we can use spring.couchbase.* properties in application.properties file:


spring.couchbase.bootstrap-hosts=127.0.0.1
spring.couchbase.bucket.name=jsabucket
spring.couchbase.bucket.password=123456
spring.data.couchbase.auto-index=true

For working with Couchbase repository, we use CouchbaseRepository interface:

More at:

https://grokonez.com/spring-framework/spring-data/couchbase-create-spring-jpa-couchbase-application-springboot

Top comments (0)