The Azure Code Samples are currently available in English
Developing a SpringBoot app using Azure Cosmos DB for MongoDB API
Azure Cosmos DB is a fully managed globally distributed, multi-model database service, transparently replicating your data across any number of Azure regions. You can elastically scale throughput and storage, and take advantage of fast, single-digit-millisecond data access using the API of your choice backed by 99.999 SLA. This sample shows you how to use the Azure Cosmos DB for MongoDB API to store and access data from a SpringBoot application.
Running this sample
Before you can run this sample, you must have the following prerequisites:
Then, clone this repository.
Next, substitute the
spring.data.mongodb.uriin src\main\resources\application.properties with your Cosmos DB account's values.
Run your application.
About the code
The code included in this sample is intended to illustrate using Azure Cosmos DB for MongoDB API from SpringBoot application. It is a port of the sample from SpringBoot Getting Started article. It also uses code from this tutorial to configure read preference for different repositories.