Skip to content

A application showcasing how to setup and configure Spring Data JPA for use with Google Cloud Spanner

Notifications You must be signed in to change notification settings

tkarlsson/spannerjpa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spanner JPA

An example application that uses Spring Boot Data JPA Repositories to save and read information from Cloud Spanner

Configure

Deploy

$PROJECT_NAME - Project name for deployment. $SA - Service account to run the service. $REGION - Region to deploy.

gcloud run deploy spannerjpa --quiet --image gcr.io/${PROJECT_NAME}/spannerdemos/spannerjpa --platform managed --project $PROJECT_NAME --service-account $SA --memory 512Mi --timeout 300 --concurrency 80 --max-instances 1 --cpu 1 --set-env-vars SPRING_CLOUD_GCP_LOGGING_PROJECT_ID=${PROJCECT_NAME},spring.profiles.active=testgcp --region ${REGION}

Run

gcurl='curl --header "Authorization: Bearer $(gcloud auth print-identity-token)"'.

gcurl https://<service url>.a.run.app/loaddata.

gcurl https://<service url>.a.run.app/

About

A application showcasing how to setup and configure Spring Data JPA for use with Google Cloud Spanner

Resources

Stars

Watchers

Forks

Packages

No packages published