Skip to content

Code samples for the CockroachDB Spring Boot training program.

License

Notifications You must be signed in to change notification settings

cockroachlabs-field/training-modules

Repository files navigation

Java Developer Training Modules

Spring Boot code samples referenced from the Java Developer Training presentation deck.

Modules

Terms of Use

This tool is not supported by Cockroach Labs. Use of this tool is entirely at your own risk and Cockroach Labs makes no guarantees or warranties about its operation.

See MIT for terms and conditions.

Compatibility

  • MacOS
  • Linux
  • JDK 21+ (LTS)
  • CockroachDB v23+

Setup

Things you need to build and run the modules locally.

Prerequisites

Install the JDK

MacOS (using sdkman):

curl -s "https://get.sdkman.io" | bash
sdk list java
sdk install java 21.0 (use TAB to pick edition)  

Ubuntu:

sudo apt-get install openjdk-21-jdk

Database Setup

See start a local cluster for setup instructions. You can also use CockroachDB Cloud (basic, standard or advanced). A valid license is needed for some of the chapters that use enterprise features like follower reads and CDC.

Building

Clone the project

git clone git@github.com:cockroachlabs-field/training-modules.git && cd training-modules

Build the artifact

chmod +x mvnw
./mvnw clean install

Running

Pick the training chapter you want to run the tests in, for example.

cd training-modules-ch1-transactions

Then run the test starter script which will present a menu of options:

./run-test.sh

If you need to connect to a CockroachCloud cluster or non-local cluster, you can edit the ./run-server.sh file accordingly.


That is all, carry on!

Releases

No releases published

Packages

No packages published