This sample demonstrates how to use Google Cloud Spanner from Google App Engine standard Java 11 environment.
- Install the Google Cloud SDK and run:
gcloud init
If this is your first time creating an App engine application:
gcloud app create
-
Update
SPANNER_INSTANCEvalue in[app.yaml](src/main/appengine/app.yaml)with your instance id.
/spanner: will run sample operations against the spanner instance in order. Individual tasks can be run using thetaskquery parameter. See SpannerTasks for supported set of tasks. Note : by default all the spanner example operations run in order, this operation may take a while to return.
mvn clean package appengine:deploy -Dapp.deploy.projectId=<your-project-id>
To see the results of the deployed sample application, open
https://PROJECT_ID.appspot.com/spanner in a web browser.
Note : by default all the spanner example operations run in order, this operation may take a while to show results.