Skip to content

Commit 4c46c4a

Browse files
authored
Add clarification for hibernate docs (GoogleCloudPlatform#1566)
Adds some clarification for setting the database connection URL in the Spanner + Hibernate sample documentation.
1 parent 07600f3 commit 4c46c4a

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

spanner/hibernate/README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,18 @@ libraries.
2727

2828
4. Enable application default credentials by running the command `gcloud auth application-default login`.
2929

30-
5. Set the parameters for your Spanner database in the database connection string in `src/main/resources/hibernate.cfg.xml`:
31-
`jdbc:cloudspanner:/projects/{YOUR_PROJECT_ID}/instances/{YOUR_INSTANCE_ID}/databases/{YOUR_DATABASE_ID}`
30+
5. Set the parameters for your Spanner database in the database connection string in
31+
`src/main/resources/hibernate.cfg.xml`. The database connection string has the following format:
32+
33+
```
34+
jdbc:cloudspanner:/projects/{YOUR_PROJECT_ID}/instances/{YOUR_INSTANCE_ID}/databases/{YOUR_DATABASE_ID}
35+
```
36+
37+
Replace the placeholders in the string with the information for your Spanner database:
38+
39+
* `YOUR_PROJECT_ID` - The Project ID of your Google Cloud Platform project
40+
* `YOUR_INSTANCE_ID` - The name of your Spanner instance that you created
41+
* `YOUR_DATABASE_ID` - The name of your database within the Spanner instance that you created
3242
3343
## Run the Example
3444

0 commit comments

Comments
 (0)