Cloud Spanner is a horizontally-scalable database-as-a-service with transactions and SQL support. These sample Java applications demonstrate how to access the Spanner API using the Google Cloud Client Library for Java.
Install Maven.
Build your project with:
mvn clean package -DskipTests
You can then run a given ClassName
via:
mvn exec:java -Dexec.mainClass=com.example.spanner.ClassName \
-DpropertyName=propertyValue \
-Dexec.args="any arguments to the app"
mvn exec:java -Dexec.mainClass=com.example.spanner.QuickstartSample -Dexec.args="my-instance my-database"
mvn exec:java -Dexec.mainClass=com.example.spanner.SpannerSample -Dexec.args="<command> my-instance my-database"
mvn verify -Dspanner.test.instance=<instance id> -Dspanner.sample.database=<new database id> -Dspanner.quickstart.database=<existing database id>