Skip to content
Branch: master
Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
src fix test in master branch (#2036) ; fixes #2034 Nov 13, 2019
README.adoc URL Cleanup Mar 20, 2019
pom.xml Bump versions post 1.2 release to 1.3 (#2058) Nov 26, 2019

README.adoc

Spring Cloud GCP Cloud Datastore Starter Example

This code sample demonstrates how to read and write POJOs from Google Cloud Datastore using the Spring Data Cloud Datastore module Spring Cloud GCP Cloud Datastore Starter.

Running the example

  1. Create a new Cloud Datastore database in your GCP project if this has not already been done to allow Cloud Datastore to create and store entities.

  2. If you are authenticated in the Cloud SDK, your credentials will be automatically found by the Spring Boot Starter for Google Cloud Datastore.

    Alternatively, create a service account from the Google Cloud Console and download its private key.

    Then, uncomment the spring.cloud.gcp.datastore.credentials.location property in the application.properties file and fill its value with the path to your service account private key on your local file system, prepended with file:.

  3. Run the DatastoreRepositoryExample Spring Boot console app. This causes the app to generate sample Singer objects filled with some demo data and persists them to Cloud Datastore. These POJOs are then retrieved and their contents are printed in the output.

You can’t perform that action at this time.