Getting Started with ScalarDB Cluster SQL via Spring Data JDBC for ScalarDB
This tutorial describes how to create a sample application by using ScalarDB Cluster SQL via Spring Data JDBC for ScalarDB.
Prerequisites for this sample application
- One of the following Java Development Kits (JDKs):
- Oracle JDK 8
- OpenJDK 8 from Eclipse Temurin, Amazon Corretto, or Microsoft
- ScalarDB Cluster running on a Kubernetes cluster
- We assume that you have a ScalarDB Cluster running on a Kubernetes cluster that you deployed by following the instructions in Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart.
This sample application only works with Java 8. However, ScalarDB itself works with Java LTS versions, which means that you can use Java LTS versions for your application that uses ScalarDB. For details on the requirements of ScalarDB, such as which Java versions can be used, see Requirements.
In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster that you deployed by following the instructions in Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart.
In addition, you need access to the ScalarDB Cluster GitHub repository, packages in the ScalarDB Cluster repository, and packages in the ScalarDB SQL repository. These repositories are available only to users with a commercial license and permission. To get a license and permission, please contact us.
You also need to set the gpr.user
property to your GitHub username and the gpr.key
property to your personal access token.
To do so, you must either add these properties in ~/.gradle/gradle.properties
or specify the properties by using the -P
option when running the ./gradlew
command as follows:
./gradlew run ... -Pgpr.user=<YOUR_GITHUB_USERNAME> -Pgpr.key=<YOUR_PERSONAL_ACCESS_TOKEN>
Or you can use environment variables, such as USERNAME
for your GitHub username and TOKEN
for your personal access token.
export USERNAME=<YOUR_GITHUB_USERNAME>
export TOKEN=<YOUR_PERSONAL_ACCESS_TOKEN>
For more details, see Developer Guide for ScalarDB Cluster with the Java API.