Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ com.azure.spring:azure-spring-cloud-feature-management-web;2.0.0;2.1.0-beta.1
com.azure.spring:azure-spring-cloud-feature-management;2.0.0;2.1.0-beta.1
com.azure.spring:azure-spring-cloud-starter-appconfiguration-config;2.0.0-beta.2;2.0.0-beta.3
com.azure.spring:azure-identity-spring;1.6.0;1.7.0-beta.1
com.azure.spring:azure-spring-boot-bom;3.5.0;3.6.0
com.azure.spring:azure-spring-boot-starter-active-directory-b2c;3.6.0;3.7.0-beta.1
com.azure.spring:azure-spring-boot-starter-active-directory;3.6.0;3.7.0-beta.1
com.azure.spring:azure-spring-boot-starter-cosmos;3.6.0;3.7.0-beta.1
Expand All @@ -154,6 +155,7 @@ com.azure.spring:azure-spring-boot-starter;3.6.0;3.7.0-beta.1
com.azure.spring:azure-spring-boot;3.6.0;3.7.0-beta.1
com.azure.spring:azure-spring-cloud-autoconfigure;2.6.0;2.7.0-beta.1
com.azure.spring:azure-spring-cloud-context;2.6.0;2.7.0-beta.1
com.azure.spring:azure-spring-cloud-dependencies;2.5.0;2.6.0
com.azure.spring:azure-spring-cloud-messaging;2.6.0;2.7.0-beta.1
com.azure.spring:azure-spring-cloud-starter-cache;2.6.0;2.7.0-beta.1
com.azure.spring:azure-spring-cloud-starter-eventhubs-kafka;2.6.0;2.7.0-beta.1
Expand Down
2 changes: 1 addition & 1 deletion sdk/boms/azure-spring-boot-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-bom</artifactId>
<version>3.6.0</version>
<version>3.6.0</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot-bom;dependency} -->
<packaging>pom</packaging>

<name>Azure Spring Boot BOM</name>
Expand Down
36 changes: 27 additions & 9 deletions sdk/boms/azure-spring-cloud-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-cloud-dependencies</artifactId>
<version>2.6.0</version>
<version>2.6.0</version> <!-- {x-version-update;com.azure.spring:azure-spring-cloud-dependencies;dependency} -->
<packaging>pom</packaging>

<name>Azure Spring Cloud Dependencies</name>
Expand Down Expand Up @@ -43,13 +43,16 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<packageOutputDirectory>${project.build.directory}</packageOutputDirectory>
<legal><![CDATA[[INFO] Any downloads listed may be third party software. Microsoft grants you no rights for third party software.]]></legal>
<azure.spring.cloud.version>${project.version}</azure.spring.cloud.version>
<azure.spring.identity.version>1.6.0</azure.spring.identity.version> <!-- {x-version-update;com.azure.spring:azure-identity-spring;dependency} -->
<azure.spring.appconfigure.version>1.3.0</azure.spring.appconfigure.version> <!-- {x-version-update;com.microsoft.azure:spring-cloud-starter-azure-appconfiguration-config;dependency} -->
<azure.core.serializer.json.jackson.version>1.2.5</azure.core.serializer.json.jackson.version> <!-- {x-version-update;com.azure:azure-core-serializer-json-jackson;dependency} -->
<azure.core.version>1.18.0</azure.core.version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
<azure.eventhub.version>5.8.0</azure.eventhub.version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs;dependency} -->
<azure.eventhub.checkpoint.version>1.8.0</azure.eventhub.checkpoint.version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs-checkpointstore-blob;dependency} -->
<azure.servicebus.version>3.6.1</azure.servicebus.version> <!-- {x-version-update;com.microsoft.azure:azure-servicebus;external_dependency} -->
<azure.eventhub.version>5.8.0</azure.eventhub.version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs;dependency} -->
<azure.identity.version>1.3.1</azure.identity.version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
<azure.messaging.servicebus.version>7.2.3</azure.messaging.servicebus.version> <!-- {x-version-update;com.azure:azure-messaging-servicebus;dependency} -->
<azure.resourcemanager.version>2.6.0</azure.resourcemanager.version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} -->
<azure.spring.appconfigure.version>1.3.0</azure.spring.appconfigure.version> <!-- {x-version-update;com.microsoft.azure:spring-cloud-starter-azure-appconfiguration-config;dependency} -->
<azure.spring.cloud.version>${project.version}</azure.spring.cloud.version>
<azure.spring.identity.version>1.6.0</azure.spring.identity.version> <!-- {x-version-update;com.azure.spring:azure-identity-spring;dependency} -->
<azure.storage.queue.version>12.10.0</azure.storage.queue.version> <!-- {x-version-update;com.azure:azure-storage-queue;dependency} -->
</properties>

Expand Down Expand Up @@ -185,6 +188,16 @@
<artifactId>azure-core</artifactId>
<version>${azure.core.version}</version>
</dependency>
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager</artifactId>
<version>${azure.resourcemanager.version}</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>${azure.identity.version}</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-messaging-eventhubs</artifactId>
Expand All @@ -196,15 +209,20 @@
<version>${azure.eventhub.checkpoint.version}</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-servicebus</artifactId>
<version>${azure.servicebus.version}</version>
<groupId>com.azure</groupId>
<artifactId>azure-messaging-servicebus</artifactId>
<version>${azure.messaging.servicebus.version}</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-queue</artifactId>
<version>${azure.storage.queue.version}</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-serializer-json-jackson</artifactId>
<version>${azure.core.serializer.json.jackson.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
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.5.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.5.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
```
[//]: # ({x-version-update-end})

[maven doc]: https://maven.apache.org/
8 changes: 4 additions & 4 deletions sdk/spring/ENVIRONMENT_CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ We **highly recommend** you refer to the `README.md` files of the released versi
Here are the steps to get `README.md` files of the released version:

1. On GitHub, navigate to the main page of the repository.
1. Click the `master` button, then click `Tags`.
1. Click the `main` button, then click `Tags`.
1. In the "Find a tag" text box, input and enter the module name you want to search, such as `azure-spring-boot-starter-xxx`.
![Search for tag](images/search-for-tag.png "Search for a tag")
1. Click one of the searched tags. (You will find that the address in your browser bar changes to that specific version. You can manually edit the address with other versions, then quickly switch to other versions.)
Expand All @@ -29,11 +29,11 @@ git clone -b <replace-the-tag> --depth 1 https://github.com/Azure/azure-sdk-for-

### Use development version

#### Clone project from master branch
It means cloning the master branch, all the code, dependencies, and readme files are up to date.
#### Clone project from main branch
It means cloning the main branch, all the code, dependencies, and readme files are up to date.

```shell script
git clone -b master --depth 1 https://github.com/Azure/azure-sdk-for-java.git
git clone -b main --depth 1 https://github.com/Azure/azure-sdk-for-java.git
```

#### Build module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ while protecting the identities of your customers at the same time.
- [Tutorial create Active Directory B2C tenant][tutorial_create_tenant]

### 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.6.0</version>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-active-directory-b2c</artifactId>
</dependency>
```
[//]: # "{x-version-update-end}"

### Configurable properties
This starter provides following properties to be customized:
Expand Down Expand Up @@ -76,12 +75,10 @@ This scenario uses the [The OAuth 2.0 authorization code grant] flow to login in

1. Add the following dependencies in your *pom.xml*.

[//]: # "{x-version-update-start;com.azure.spring:azure-spring-boot-starter-active-directory-b2c;current}"
```xml
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-active-directory-b2c</artifactId>
<version>3.6.0</version>
</dependency>

<dependency>
Expand All @@ -104,7 +101,6 @@ This scenario uses the [The OAuth 2.0 authorization code grant] flow to login in
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
</dependency>
```
[//]: # "{x-version-update-end}"

1. Add properties in *application.yml* using the values you created earlier, for example:

Expand Down Expand Up @@ -306,20 +302,17 @@ This scenario not support login. Just protect the server by validating the acces

1. Add the following dependencies in your *pom.xml*.

[//]: # "{x-version-update-start;com.azure.spring:azure-spring-boot-starter-active-directory-b2c;current}"
```xml
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-active-directory-b2c</artifactId>
<version>3.6.0</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
```
[//]: # "{x-version-update-end}"

1. Add the following configuration.

Expand Down Expand Up @@ -526,7 +519,7 @@ Please follow [instructions here](https://github.com/Azure/azure-sdk-for-java/bl
[sample]: https://github.com/Azure/azure-sdk-for-java/tree/main/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/main/sdk/spring/ENVIRONMENT_CHECKLIST.md#ready-to-run-checklist

[Add azure-spring-boot-bom]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/AZURE_SPRING_BOMS_USAGE.md#add-azure-spring-boot-bom
[tutorial_create_tenant]: https://docs.microsoft.com/azure/active-directory-b2c/tutorial-create-tenant
[The OAuth 2.0 authorization code grant]: https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow
[The OAuth 2.0 client credentials grant]: https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow
Expand Down
27 changes: 13 additions & 14 deletions sdk/spring/azure-spring-boot-starter-active-directory/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,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 @@ -43,20 +53,17 @@ example `http://localhost:8080/login/oauth2/code/`. Note the tailing `/` cannot

* Step 2: Add the following dependencies in your 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.6.0</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
azure:
Expand Down Expand Up @@ -103,19 +110,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.6.0</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 @@ -157,19 +161,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.6.0</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 @@ -219,12 +220,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.6.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -235,7 +234,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 @@ -692,7 +690,7 @@ Please follow [instructions here] to build from source or contribute.
[The OAuth 2.0 authorization code grant]: https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow
[azure-spring-boot-sample-active-directory-webapp]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-webapp
[azure-spring-boot-sample-active-directory-resource-server]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server/README.md
[azure-spring-boot-sample-active-directory-resource-server-obo]: https://github.com/ZhuXiaoBing-cn/azure-sdk-for-java/tree/main/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server-obo
[azure-spring-boot-sample-active-directory-resource-server-obo]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server-obo
[azure-spring-boot-sample-active-directory-resource-server-by-filter]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server-by-filter
[AAD App Roles feature]: https://docs.microsoft.com/azure/architecture/multitenant-identity/app-roles#roles-using-azure-ad-app-roles
[client credentials grant flow]: https://docs.microsoft.com/azure/active-directory/develop/v1-oauth2-client-creds-grant-flow
Expand All @@ -714,6 +712,7 @@ Please follow [instructions here] to build from source or contribute.
[prerequisite]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/azure-spring-boot-starter-active-directory#prerequisites
[Accessing a web application]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/azure-spring-boot-starter-active-directory#accessing-a-web-application
[environment_checklist]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/ENVIRONMENT_CHECKLIST.md#ready-to-run-checklist
[Add azure-spring-boot-bom]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/AZURE_SPRING_BOMS_USAGE.md#add-azure-spring-boot-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.6.0</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/main/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/main/sdk/spring/ENVIRONMENT_CHECKLIST.md#ready-to-run-checklist

[Add azure-spring-boot-bom]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/AZURE_SPRING_BOMS_USAGE.md#add-azure-spring-boot-bom
Loading