Issue
I have two Firestore databases in my google cloud "default" and "mydb". When I set up my spring boot app to connect to the database it always connect to the "default" one. How to connect to the "mydb" database in my spring boot app?
Solution
You'll use a code snippet similar to what's shown in the Firestore documentation on initializing the client, but then in the builder make sure to call setDatabaseId passing in the database ID of the instance you want to access.
Answered By - Frank van Puffelen
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.