Java samples for Firestore
This sample app demonstrates a basic end-to-end Java integration. The app does not demonstrate advanced Firestore features or best practices for large data sets.
To browse the sample source, go to the sample page.
To clone the source:
git clone https://github.com/googleapis/java-firestore.
- Browse to the
samples/snippetsdirectory to see relevant code.
To build and run the sample:
- Set up your environment to work with Firestore.
- Navigate to the
samples/snippetsdirectory in the
java-firestorerepository as described above.
mvn clean packageto build the quickstart.
Run the quickstart, replacing
[PROJECT_ID]with your project ID:
mvn exec:exec -Dfirestore.project.id="[PROJECT_ID]"
This quickstart demonstrates how to connect to Firestore, then add and query documents in a collection.