Skip to content

LewisWatson/demo-spring-data-couchbase-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demo Spring Data Couchbase App

Example Spring Boot app which integrates with a Couchbase NoSQL Database using Spring Data Couchbase.

Integration Tests

Run Integration Tests

A couchbase test server configured according to is required in order to run the integration tests. Instructions to set up such a server are provided in Docker Couchbase Test Server.

$ ./gradlew integrationTest

Docker Couchbase Test Server

  1. spin up container

    docker run -d --name db -p 8091-8094:8091-8094 -p 11210:11210 couchbase:6.0.0
  2. Visit http://localhost:8091 on the host machine to see the Web Console

  3. Walk through the Setup wizard and accept the default values.

    • You may need to disable analytics if the defaults won't run in your environment.
  4. Add a cars bucket with default settings.

  5. Navigate to Security -> Add User to create a new user called cars, with password password, and Application Access permissions on cars bucket.

  6. Create index

    Go to Query and run the following. This isn't strictly necessary due to our use of org.springframework.data.couchbase.core.query.N1qlPrimaryIndexed

    CREATE PRIMARY INDEX ON cars USING GSI;

For further information on the couchbase container, see dockerhub.com/couchbase.

About

Example Spring Data Couchbase App

Topics

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages