Skip to content

Azure-Samples/azure-spring-data-cosmos-java-sql-api-samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The samples in this repo have moved here. This repo is no longer maintained.

Azure Cosmos DB for NoSQL & Spring Data sample

Azure Cosmos DB for NoSQL & Spring Data sample code

Features

This repo provides basic sample code for getting started with Azure Cosmos DB for NoSQL SQL API using the azure-spring-data-cosmos library for Java.

Getting Started

Prerequisites

  • Java Development Kit 8 or JDK 11 if you run the azure-spring-data-cosmos-java-11-getting-started.
  • An active Azure Cosmos DB for NoSQL account. If you don't have an Azure subscription, you can sign up for a free subscription for Azure.
  • (Optional) SLF4J is a logging facade.
    • (Optional) SLF4J binding is used to associate a specific logging framework with SLF4J.
  • (Optional) Maven.

SLF4J is only needed if you plan to use logging, please also download an SLF4J binding which will link the SLF4J API with the logging implementation of your choice. See the SLF4J user manual for more information.

GitHub Codespaces

Open in GitHub Codespaces

Quickstart

  1. In an empty directory, clone the repository: git clone https://github.com/Azure-Samples/azure-spring-data-cosmos-java-sql-api-samples.git .
  2. Update the src/main/resources/application.properties file with the uri, primary key, and *secondary key from your Azure Cosmos DB for NoSQL account.
  3. Run the application: mvn spring-boot:run

Resources

Please refer to Spring Data for Azure Cosmos DB for NoSQL source code for more information.

About

Spring Data Azure Cosmos DB samples repo

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages