page_type | languages | products | description | urlFragment | ||
---|---|---|---|---|---|---|
sample |
|
|
Azure Spring Boot Sample project for Cosmos Multi Database Single Account |
azure-spring-boot-sample-cosmos-multi-database-single-account |
-
Log into https://portal.azure.com.
-
Click
Create a resource
. -
Input
Azure Cosmos DB
. -
Click Create.
-
On the Create key vault page, input
Subscription
,Resource group
,Account Name
, then clickReview + Create
. -
When complete, click
Go to resource
. -
Click Keys in the left navigation pane, copy your URI, the PRIMARY KEY and SECONDARY KEY;
azure.cosmos.uri=your-cosmosDb-uri
azure.cosmos.key=your-cosmosDb-key
azure.cosmos.secondary-key=your-cosmosDb-secondary-key
azure.cosmos.database=your-cosmosDb-dbName
azure.cosmos.populate-query-metrics=if-populate-query-metrics
cd azure-spring-boot-samples/azure-spring-boot-sample-multi-database
mvn spring-boot:run
Verify Result: The corresponding data is added to cosmos database