Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
42 changes: 42 additions & 0 deletions sdk/spring/AZURE_SPRING_BOMS_USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# How to use Azure Spring BOMs

To add Azure Spring BOMs, please add the following fragment in your pom.xml.
You can refer to the [maven doc] about more details about dependency management.

## Add azure-spring-boot-bom

[//]: # ({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})

## Add azure-spring-cloud-dependencies

[//]: # ({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})

[maven doc]: https://maven.apache.org/
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@ 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}"
1. [Add azure-spring-boot-bom].
1. Add dependency. `<version>` can be skipped because we already add `azure-spring-boot-bom`.
```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 +230,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

[Add azure-spring-boot-bom]: https://github.com/Azure/azure-sdk-for-java/blob/master/AZURE_SPRING_BOMS_USAGE.md#adding-the-azure-spring-boot-bom-bom
23 changes: 11 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,16 @@ 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
1. [Add azure-spring-boot-bom].
1. Add dependency. `<version>` can be skipped because we already add `azure-spring-boot-bom`.
```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 +52,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 +109,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 +160,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 +219,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 +233,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 +583,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
[Add azure-spring-boot-bom]: https://github.com/Azure/azure-sdk-for-java/blob/master/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
11 changes: 5 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,14 @@
- [Environment checklist][environment_checklist]

### Include the package
[//]: # ({x-version-update-start;com.azure.spring:azure-spring-boot-starter-cosmos;current})
1. [Add azure-spring-boot-bom].
1. Add dependency. `<version>` can be skipped because we already add `azure-spring-boot-bom`.
```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 +296,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

[Add azure-spring-boot-bom]: https://github.com/Azure/azure-sdk-for-java/blob/master/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,14 @@ 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})
1. [Add azure-spring-boot-bom].
1. Add dependency. `<version>` can be skipped because we already add `azure-spring-boot-bom`.
```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 +208,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
[Add azure-spring-boot-bom]: https://github.com/Azure/azure-sdk-for-java/blob/master/AZURE_SPRING_BOMS_USAGE.md#adding-the-azure-spring-boot-bom-bom
10 changes: 5 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,14 @@ 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})
1. [Add azure-spring-boot-bom].
1. Add dependency. `<version>` can be skipped because we already add `azure-spring-boot-bom`.
```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 +263,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
[Add azure-spring-boot-bom]: https://github.com/Azure/azure-sdk-for-java/blob/master/AZURE_SPRING_BOMS_USAGE.md#adding-the-azure-spring-boot-bom-bom
10 changes: 5 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,14 @@ 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})
1. [Add azure-spring-boot-bom].
1. Add dependency. `<version>` can be skipped because we already add `azure-spring-boot-bom`.
```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 +126,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
[Add azure-spring-boot-bom]: https://github.com/Azure/azure-sdk-for-java/blob/master/AZURE_SPRING_BOMS_USAGE.md#adding-the-azure-spring-boot-bom-bom
10 changes: 5 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,14 @@ 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})
1. [Add azure-spring-boot-bom].
1. Add dependency. `<version>` can be skipped because we already add `azure-spring-boot-bom`.
```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 +77,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
[Add azure-spring-boot-bom]: https://github.com/Azure/azure-sdk-for-java/blob/master/AZURE_SPRING_BOMS_USAGE.md#adding-the-azure-spring-boot-bom-bom
27 changes: 5 additions & 22 deletions sdk/spring/azure-spring-boot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,14 @@ 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.

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})
1. [Add azure-spring-boot-bom].
1. Add dependency. `<version>` can be skipped because we already add `azure-spring-boot-bom`.
```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</artifactId>
</dependency>
```
[//]: # ({x-version-update-end})

## Key concepts
This project provides auto-configuration for the following Azure services:
Expand Down Expand Up @@ -118,3 +100,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
[Add azure-spring-boot-bom]: https://github.com/Azure/azure-sdk-for-java/blob/master/AZURE_SPRING_BOMS_USAGE.md#adding-the-azure-spring-boot-bom-bom
18 changes: 5 additions & 13 deletions sdk/spring/azure-spring-cloud-autoconfigure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,14 @@ This package is for Spring Cloud Starters of Azure services. It helps Spring Clo
- [Environment checklist][environment_checklist]

### Include the Package
To start a new project using Azure, go on [start.spring.io][spring_io] and select "Azure
Support": this will configure the project to make sure you can integrate easily with Azure service.

For instance, let's assume that you want to use Event Hubs starter, you can add the usual `spring-cloud-starter-azure-eventhubs`
dependency to your project and the Spring Cloud auto-configuration will kick-in:

[//]: # ({x-version-update-start;com.azure.spring:azure-spring-cloud-starter-eventhubs;current})
1. [Add azure-spring-cloud-dependencies].
1. Add dependency. `<version>` can be skipped because we already add `azure-spring-cloud-dependencies`.
```xml
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-cloud-starter-eventhubs</artifactId>
<version>2.5.0-beta.1</version>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-cloud-autoconfigure</artifactId>
</dependency>
```
[//]: # ({x-version-update-end})

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

## Key concepts
This project provides auto-configuration for the following Azure services:
Expand Down Expand Up @@ -110,3 +101,4 @@ Please follow [instructions here][contributing_md] to build from source or contr
[service_bus_sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-integration-sample-servicebus
[storage_queue_sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-integration-sample-storage-queue
[environment_checklist]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/ENVIRONMENT_CHECKLIST.md#ready-to-run-checklist
[Add azure-spring-cloud-dependencies]: https://github.com/Azure/azure-sdk-for-java/blob/master/AZURE_SPRING_BOMS_USAGE.md#adding-the-azure-spring-cloud-dependencies-bom
Loading