{"id":45157410,"url":"https://github.com/couchbase-examples/java-transactions-quickstart","last_synced_at":"2026-02-20T05:02:39.477Z","repository":{"id":39412838,"uuid":"372853247","full_name":"couchbase-examples/java-transactions-quickstart","owner":"couchbase-examples","description":"A Spring Boot application that illustrates using Couchbase transactions with Java SDK","archived":false,"fork":false,"pushed_at":"2025-02-12T16:10:45.000Z","size":1351,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-12T17:25:54.072Z","etag":null,"topics":["acid","couchbase","how-to","howto","java","spring-boot","transactions","tutorial"],"latest_commit_sha":null,"homepage":"https://developer.couchbase.com/tutorial-java-transactions/","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/couchbase-examples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-01T14:10:36.000Z","updated_at":"2025-02-12T16:10:47.000Z","dependencies_parsed_at":"2025-02-12T17:34:29.939Z","dependency_job_id":null,"html_url":"https://github.com/couchbase-examples/java-transactions-quickstart","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/couchbase-examples/java-transactions-quickstart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchbase-examples%2Fjava-transactions-quickstart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchbase-examples%2Fjava-transactions-quickstart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchbase-examples%2Fjava-transactions-quickstart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchbase-examples%2Fjava-transactions-quickstart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/couchbase-examples","download_url":"https://codeload.github.com/couchbase-examples/java-transactions-quickstart/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchbase-examples%2Fjava-transactions-quickstart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29641929,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T03:21:14.183Z","status":"ssl_error","status_checked_at":"2026-02-20T03:18:24.455Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acid","couchbase","how-to","howto","java","spring-boot","transactions","tutorial"],"created_at":"2026-02-20T05:02:36.556Z","updated_at":"2026-02-20T05:02:39.469Z","avatar_url":"https://github.com/couchbase-examples.png","language":"CSS","readme":"# Demo App using Couchbase Transactions in Java\n#### Use distributed transactions with Couchbase's Java SDK 3 and Spring Boot\n\n\u003e This repo is Quickstart in Couchbase transactions with Java and Spring Boot designed to teach you how to use transactions with Couchbase's Java SDK 3\n\n[![Try it now!](https://da-demo-images.s3.amazonaws.com/runItNow_outline.png?couchbase-example=java-transactions-quickstart-repo\u0026source=github)](https://gitpod.io/#https://github.com/couchbase-examples/java-transactions-quickstart)\n\nFull documentation can be found on the [Couchbase Developer Portal](https://developer.couchbase.com/tutorial-java-transactions/).\n## Prerequisites\nTo run this prebuilt project, you will need:\n\n- Couchbase 7 Installed (version 7.0.0-5247 or higher)\n- Git\n- Java SDK v1.8 or higher installed \n- Code Editor installed (IntelliJ IDEA, Eclipse, or Visual Studio Code)\n\n## Install Dependencies \n```sh\nmvn package\n```\n\u003e Note: Maven packages auto restore when building the project in IntelliJ IDEA or Eclipse depending on IDE configuration.\n\n### Database Server Configuration\n\nAll configuration for communication with the database is stored in the `/src/main/java/resources/application.properties` file.  This includes the connection string, username, and password.  The default username is assumed to be `Administrator` and the default password is assumed to be `password`.  If these are different in your environment you will need to change them before running the application.\n\n### Dependency Injection via DBSetupRunner class \n\nThe quickstart code provides a CommandLineRunner called DBSetupRunner in the runners folder that wires up the Bucket and Cluster objects for dependency injection.  This runner also creates the bucket, collection, scope, and indexes for the tutorial to run properly automatically when the application \n\n## Running The Application\n\nAt this point the application is ready and you can run it via your IDE or from the terminal:\n\n```sh\nmvn spring-boot:run -e -X\n```\n\nYou can launch your browser and go to the [Swagger start page](https://localhost:8080/).\n\n## Running The Tests\n\nTo run the standard integration tests, use the following commands:\n\n```sh\nmvn test\n```\n\n## Project Setup Notes\n\nThis project was based on the standard [Spring Boot project](https://spring.io/guides/gs/rest-service/).  The HealthCheckController is provided as a santity check and is used in unit tests.  \n\nA fully list of packages are referenced in the pom.xml file\n\n## Conclusion\nCreating reliable Java applications that guarantee database consistency with Couchbase is simple. This project when run with Couchbase Server 7 installed creates a bucket in Couchbase, an index for our parameterized [N1QL query](https://docs.couchbase.com/java-sdk/current/howtos/n1ql-queries-with-sdk.html), and showcases basic distributed transactions with Couchbase Server.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcouchbase-examples%2Fjava-transactions-quickstart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcouchbase-examples%2Fjava-transactions-quickstart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcouchbase-examples%2Fjava-transactions-quickstart/lists"}