Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions sdk/spring/AZURE_SPRING_BOMS_USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# How to use azure spring BOMs

### Adding the azure-spring-boot-bom BOM

To consume the azure spring boot BOM include it in the `dependencyManagement` section of your project's POM.
Note that this **does not** result in all dependencies being included in your project.

[//]: # ({x-version-update-start;com.azure.spring:azure-spring-boot-bom;dependency})
```xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-bom</artifactId>
<version>3.4.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
```
[//]: # ({x-version-update-end})

### Adding the azure-spring-cloud-dependencies BOM

To consume the azure spring cloud dependencies BOM include it in the `dependencyManagement` section of your project's POM.
Note that this **does not** result in all dependencies being included in your project.

[//]: # ({x-version-update-start;com.azure.spring:azure-spring-cloud-dependencies;dependency})
```xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-cloud-dependencies</artifactId>
<version>2.4.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
```
[//]: # ({x-version-update-end})
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ while protecting the identities of your customers at the same time.
- [Environment checklist][environment_checklist]

### Include the package
[//]: # "{x-version-update-start;com.azure.spring:azure-spring-boot-starter-active-directory-b2c;current}"
Please refer to [Adding the azure-spring-boot-bom BOM] to add dependency management item.

After adding the azure spring boot BOM, Azure spring boot libraries included in the BOM are now available to be
added as a dependency without listing the artifact's version.
```xml
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-active-directory-b2c</artifactId>
<version>3.5.0-beta.1</version>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-active-directory-b2c</artifactId>
</dependency>
```
[//]: # "{x-version-update-end}"

### Create the Active Directory instance

Expand Down Expand Up @@ -231,4 +232,4 @@ Please follow [instructions here](https://github.com/Azure/azure-sdk-for-java/bl
[sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc
[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application
[environment_checklist]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/ENVIRONMENT_CHECKLIST.md#ready-to-run-checklist

[Adding the azure-spring-boot-bom BOM]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/AZURE_SPRING_BOMS_USAGE.md#adding-the-azure-spring-boot-bom-bom
25 changes: 13 additions & 12 deletions sdk/spring/azure-spring-boot-starter-active-directory/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ The `azure-spring-boot-starter-active-directory` (`aad-starter` for short) provi
- [Environment checklist][environment_checklist]
- [Register an application in Azure Portal][register_an_application_in_portal]

### Include the package
Please refer to [Adding the azure-spring-boot-bom BOM] to add dependency management item.

After adding the azure spring boot BOM, Azure spring boot libraries included in the BOM are now available to be
added as a dependency without listing the artifact's version.
```xml
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-active-directory</artifactId>
</dependency>
```

## Key concepts

A `web application` is any web based application that allows user to login, whereas a `resource server` will either accept or deny access after validating access_token. We will cover 4 scenarios in this guide:
Expand All @@ -42,19 +54,16 @@ example `http://localhost:8080/login/oauth2/code/`. Note the tailing `/` cannot

* Step 2: Add the following dependencies in you pom.xml.

[//]: # "{x-version-update-start;com.azure.spring:azure-spring-boot-starter-active-directory;current}"
```xml
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-active-directory</artifactId>
<version>3.5.0-beta.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-oauth2-client</artifactId>
</dependency>
```
[//]: # "{x-version-update-end}"

* Step 3: Add properties in application.yml. These values should be got in [prerequisite].
```yaml
Expand Down Expand Up @@ -102,19 +111,16 @@ example `http://localhost:8080/login/oauth2/code/`. Note the tailing `/` cannot

* Step 2: Add the following dependencies in you pom.xml.

[//]: # "{x-version-update-start;com.azure.spring:azure-spring-boot-starter-active-directory;current}"
```xml
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-active-directory</artifactId>
<version>3.5.0-beta.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-oauth2-client</artifactId>
</dependency>
```
[//]: # "{x-version-update-end}"

* Step 3: Add properties in application.yml:
```yaml
Expand Down Expand Up @@ -156,19 +162,16 @@ To use **aad-starter** in this scenario, we need these steps:

* Step 1: Add the following dependencies in you pom.xml.

[//]: # "{x-version-update-start;com.azure.spring:azure-spring-boot-starter-active-directory;current}"
```xml
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-active-directory</artifactId>
<version>3.5.0-beta.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-oauth2-resource-server</artifactId>
</dependency>
```
[//]: # "{x-version-update-end}"

* Step 2: Add properties in application.yml:
```yaml
Expand Down Expand Up @@ -218,12 +221,10 @@ To use **aad-starter** in this scenario, we need these steps:

* Step 1: Add the following dependencies in you pom.xml.

[//]: # "{x-version-update-start;com.azure.spring:azure-spring-boot-starter-active-directory;current}"
```xml
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-active-directory</artifactId>
<version>3.5.0-beta.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -234,7 +235,6 @@ To use **aad-starter** in this scenario, we need these steps:
<artifactId>spring-boot-starter-oauth2-client</artifactId>
</dependency>
```
[//]: # "{x-version-update-end}"

* Step 2: Add properties in application.yml:
```yaml
Expand Down Expand Up @@ -585,6 +585,7 @@ Please follow [instructions here] to build from source or contribute.
[prerequisite]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-starter-active-directory#prerequisites
[Accessing a web application]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-starter-active-directory#accessing-a-web-application
[environment_checklist]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/ENVIRONMENT_CHECKLIST.md#ready-to-run-checklist
[Adding the azure-spring-boot-bom BOM]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/AZURE_SPRING_BOMS_USAGE.md#adding-the-azure-spring-boot-bom-bom
[Conditional Access]: https://docs.microsoft.com/azure/active-directory/conditional-access
[Grant Access]: https://docs.microsoft.com/azure/active-directory/conditional-access/concept-conditional-access-grant
[Block Access]: https://docs.microsoft.com/azure/active-directory/conditional-access/howto-conditional-access-policy-block-access
Expand Down
13 changes: 7 additions & 6 deletions sdk/spring/azure-spring-boot-starter-cosmos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
- [Environment checklist][environment_checklist]

### Include the package
[//]: # ({x-version-update-start;com.azure.spring:azure-spring-boot-starter-cosmos;current})
Please refer to [Adding the azure-spring-boot-bom BOM] to add dependency management item.

After adding the azure spring boot BOM, Azure spring boot libraries included in the BOM are now available to be
added as a dependency without listing the artifact's version.
```xml
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-cosmos</artifactId>
<version>3.5.0-beta.1</version>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-cosmos</artifactId>
</dependency>
```
[//]: # ({x-version-update-end})

## Key concepts
- Spring Data ReactiveCrudRepository basic CRUD functionality
Expand Down Expand Up @@ -297,4 +298,4 @@ Please follow [instructions here](https://github.com/Azure/azure-sdk-for-java/bl
[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application
[sample_cosmos_switch_key]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/spring/data/cosmos/SampleApplication.java
[environment_checklist]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/ENVIRONMENT_CHECKLIST.md#ready-to-run-checklist

[Adding the azure-spring-boot-bom BOM]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/AZURE_SPRING_BOMS_USAGE.md#adding-the-azure-spring-boot-bom-bom
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ Azure Key Vault Secrets Spring Boot Starter is Spring starter for [Azure Key Vau
- [Environment checklist][environment_checklist]

### Include the package
[//]: # ({x-version-update-start;com.azure.spring:azure-spring-boot-starter-keyvault-secrets;current})
Please refer to [Adding the azure-spring-boot-bom BOM] to add dependency management item.

After adding the azure spring boot BOM, Azure spring boot libraries included in the BOM are now available to be
added as a dependency without listing the artifact's version.
```xml
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-keyvault-secrets</artifactId>
<version>3.5.0-beta.1</version>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-keyvault-secrets</artifactId>
</dependency>
```
[//]: # ({x-version-update-end})

## Key concepts
Key Vault provides secure storage of secrets, such as passwords and database connection strings.
Expand Down Expand Up @@ -209,3 +210,4 @@ Please follow [instructions here](https://github.com/Azure/azure-sdk-for-java/bl
[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application
[version_link]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretServiceVersion.java#L12
[environment_checklist]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/ENVIRONMENT_CHECKLIST.md#ready-to-run-checklist
[Adding the azure-spring-boot-bom BOM]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/AZURE_SPRING_BOMS_USAGE.md#adding-the-azure-spring-boot-bom-bom
12 changes: 7 additions & 5 deletions sdk/spring/azure-spring-boot-starter-servicebus-jms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ With this starter you could easily use Spring JMS Queue and Topic with Azure Ser
- [Environment checklist][environment_checklist]

### Include the package
[//]: # ({x-version-update-start;com.azure.spring:azure-spring-boot-starter-servicebus-jms;current})
Please refer to [Adding the azure-spring-boot-bom BOM] to add dependency management item.

After adding the azure spring boot BOM, Azure spring boot libraries included in the BOM are now available to be
added as a dependency without listing the artifact's version.
```xml
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-servicebus-jms</artifactId>
<version>3.5.0-beta.1</version>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-servicebus-jms</artifactId>
</dependency>
```
[//]: # ({x-version-update-end})

## Key concepts
This starter uses Azure Service Bus messaging features (queues and publish/subscribe topics) from Java applications using the popular Java Message Service (JMS) API standard with AMQP 1.0.
Expand Down Expand Up @@ -264,3 +265,4 @@ Please follow [instructions here](https://github.com/Azure/azure-sdk-for-java/bl
[servicebus-message-payloads]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messages-payloads
[spring_jms_guide]: https://spring.io/guides/gs/messaging-jms/
[environment_checklist]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/ENVIRONMENT_CHECKLIST.md#ready-to-run-checklist
[Adding the azure-spring-boot-bom BOM]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/AZURE_SPRING_BOMS_USAGE.md#adding-the-azure-spring-boot-bom-bom
12 changes: 7 additions & 5 deletions sdk/spring/azure-spring-boot-starter-storage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ The project provides a Spring Boot Starter `azure-spring-boot-starter-storage` t
- [Environment checklist][environment_checklist]

### Include the package
[//]: # ({x-version-update-start;com.azure.spring:azure-spring-boot-starter-storage;current})
Please refer to [Adding the azure-spring-boot-bom BOM] to add dependency management item.

After adding the azure spring boot BOM, Azure spring boot libraries included in the BOM are now available to be
added as a dependency without listing the artifact's version.
```xml
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-storage</artifactId>
<version>3.5.0-beta.1</version>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-storage</artifactId>
</dependency>
```
[//]: # ({x-version-update-end})

## Key concepts
The Azure Storage platform is Microsoft's cloud storage solution for modern data storage scenarios. Core storage services offer a massively scalable object store for data objects, disk storage for Azure virtual machines (VMs), a file system service for the cloud, a messaging store for reliable messaging, and a NoSQL store.
Expand Down Expand Up @@ -127,3 +128,4 @@ Please follow [instructions here][contributing_md] to build from source or contr
[azure_storage]: https://azure.microsoft.com/services/storage/blobs/
[other_operation]: https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#resources
[environment_checklist]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/ENVIRONMENT_CHECKLIST.md#ready-to-run-checklist
[Adding the azure-spring-boot-bom BOM]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/AZURE_SPRING_BOMS_USAGE.md#adding-the-azure-spring-boot-bom-bom
12 changes: 7 additions & 5 deletions sdk/spring/azure-spring-boot-starter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ This repository is for Spring Boot Starters of Azure services. It helps Spring B
- [Environment checklist][environment_checklist]

### Include the Package
[//]: # ({x-version-update-start;com.azure.spring:azure-spring-boot-starter;current})
Please refer to [Adding the azure-spring-boot-bom BOM] to add dependency management item.

After adding the azure spring boot BOM, Azure spring boot libraries included in the BOM are now available to be
added as a dependency without listing the artifact's version.
```xml
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter</artifactId>
<version>3.5.0-beta.1</version>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter</artifactId>
</dependency>
```
[//]: # ({x-version-update-end})

## Key concepts

Expand Down Expand Up @@ -78,3 +79,4 @@ Please follow [instructions here](https://github.com/Azure/azure-sdk-for-java/bl
[sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples
[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application
[environment_checklist]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/ENVIRONMENT_CHECKLIST.md#ready-to-run-checklist
[Adding the azure-spring-boot-bom BOM]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/AZURE_SPRING_BOMS_USAGE.md#adding-the-azure-spring-boot-bom-bom
29 changes: 4 additions & 25 deletions sdk/spring/azure-spring-boot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,10 @@ This repo is for Spring Boot Starters of Azure services. It helps Spring Boot de
- [Environment checklist][environment_checklist]

### Include the Package
To start a new project using Azure, go on [start.spring.io](https://start.spring.io) and select "Azure
Support": this will configure the project to make sure you can integrate easily with Azure service.
Please refer to [Adding the azure-spring-boot-bom BOM] to add dependency management item.

For instance, let's assume that you want to use Key Vault secrets, you can add the usual `azure-security-keyvault-secrets`
dependency to your project and the Spring Boot auto-configuration will kick-in:

```xml
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-security-keyvault-secrets</artifactId>
</dependency>
```

Note that there is no need to add a `version` as those are managed already by the project.

Alternatively you may want to use the [starters](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-starter)

[//]: # ({x-version-update-start;com.azure.spring:azure-spring-boot-starter-keyvault-secrets;current})
```xml
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-keyvault-secrets</artifactId>
<version>3.5.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})
After adding the azure spring boot BOM, Azure spring boot libraries included in the BOM are now available to be
added as a dependency without listing the artifact's version.

## Key concepts
This project provides auto-configuration for the following Azure services:
Expand Down Expand Up @@ -118,3 +96,4 @@ You can participate community driven [![Gitter](https://badges.gitter.im/Microso
[sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples
[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application
[environment_checklist]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/ENVIRONMENT_CHECKLIST.md#ready-to-run-checklist
[Adding the azure-spring-boot-bom BOM]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/AZURE_SPRING_BOMS_USAGE.md#adding-the-azure-spring-boot-bom-bom
Loading