Skip to content

Commit

Permalink
Cherry-pick unifying configuration changes to Azure Spring Cloud 4.x (#…
Browse files Browse the repository at this point in the history
…23597)

* Unify spring configurations (#22937)
* Refactor Azure Spring projects structure (#23004)
* Mapping spring legacy props (#23166)
  ** use file for property mapping
  ** add environmentpostprocessor after kv
  ** map multiple key vault use case
* update readme for unified configuration (#23452)

Co-authored-by: Yi Liu <yiliu6@microsoft.com>
  • Loading branch information
saragluna and yiliuTo authored Aug 17, 2021
1 parent fd18071 commit 89073a3
Show file tree
Hide file tree
Showing 401 changed files with 3,211 additions and 2,275 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2314,9 +2314,6 @@

<!-- Exclude from spring related classes -->
<Match>
<Or>
<Class name="com.azure.spring.utils.PropertyLoader"/> <!-- false positive -->
</Or>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE,
NP_LOAD_OF_KNOWN_NULL_VALUE,
RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE,
Expand Down Expand Up @@ -2351,6 +2348,37 @@
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>

<Match>
<Class name="com.azure.spring.identity.SpringCredentialBuilderBase"/>
<Field name="environment"/>
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
</Match>

<Match>
<Class name="com.azure.spring.autoconfigure.jms.AzureServiceBusJMSProperties"/>
<Field name="pricingTier"/>
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
</Match>

<Match>
<Class name="com.azure.spring.keyvault.KeyVaultOperation" />
<Field name="timer" />
<Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD"/>
</Match>

<Match>
<Class name="com.azure.spring.autoconfigure.cosmos.CosmosAutoConfiguration"/>
<Field name="azureProperties"/>
<Bug pattern="URF_UNREAD_FIELD"/>
</Match>

<!-- Field is initialized in postProcessEnvironment function -->
<Match>
<Class name="com.azure.spring.autoconfigure.unity.AbstractLegacyPropertyEnvironmentPostProcessor"/>
<Field name="environment"/>
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
</Match>

<!-- The transient fields are not used if deserialization happens. -->
<Match>
<Class name="com.azure.identity.implementation.MsalAuthenticationAccount"/>
Expand Down
28 changes: 9 additions & 19 deletions eng/jacoco-test-coverage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,18 @@

<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-identity-spring</artifactId>
<version>1.8.0-beta.1</version> <!-- {x-version-update;com.azure.spring:azure-identity-spring;current} -->
<artifactId>azure-spring-cloud-context</artifactId>
<version>2.8.0-beta.1</version> <!-- {x-version-update;com.azure.spring:azure-spring-cloud-context;current} -->
</dependency>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-cloud-autoconfigure</artifactId>
<version>2.8.0-beta.1</version> <!-- {x-version-update;com.azure.spring:azure-spring-cloud-autoconfigure;current} -->
</dependency>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot</artifactId>
<version>3.8.0-beta.1</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot;current} -->
<artifactId>azure-spring-cloud-resourcemanager</artifactId>
<version>2.8.0-beta.1</version> <!-- {x-version-update;com.azure.spring:azure-spring-cloud-resourcemanager;current} -->
</dependency>
<dependency>
<groupId>com.azure.spring</groupId>
Expand Down Expand Up @@ -467,11 +472,6 @@
<artifactId>azure-spring-data-cosmos</artifactId>
<version>3.10.0-beta.1</version> <!-- {x-version-update;com.azure:azure-spring-data-cosmos;current} -->
</dependency>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-cloud-context</artifactId>
<version>2.8.0-beta.1</version> <!-- {x-version-update;com.azure.spring:azure-spring-cloud-context;current} -->
</dependency>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-integration-core</artifactId>
Expand All @@ -497,16 +497,6 @@
<artifactId>azure-spring-integration-storage-queue</artifactId>
<version>2.8.0-beta.1</version> <!-- {x-version-update;com.azure.spring:azure-spring-integration-storage-queue;current} -->
</dependency>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-cloud-storage</artifactId>
<version>2.8.0-beta.1</version> <!-- {x-version-update;com.azure.spring:azure-spring-cloud-storage;current} -->
</dependency>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-cloud-autoconfigure</artifactId>
<version>2.8.0-beta.1</version> <!-- {x-version-update;com.azure.spring:azure-spring-cloud-autoconfigure;current} -->
</dependency>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-cloud-messaging</artifactId>
Expand Down
4 changes: 1 addition & 3 deletions eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ com.azure.spring:azure-spring-cloud-appconfiguration-config;2.0.0;2.0.1-beta.1
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;2.0.1-beta.1
com.azure.spring:azure-identity-spring;1.7.0;1.8.0-beta.1
com.azure.spring:azure-spring-boot-bom;3.6.0;3.7.0
com.azure.spring:azure-spring-boot-starter-active-directory-b2c;3.7.0;3.8.0-beta.1
com.azure.spring:azure-spring-boot-starter-active-directory;3.7.0;3.8.0-beta.1
Expand All @@ -154,17 +153,16 @@ com.azure.spring:azure-spring-boot-starter-keyvault-secrets;3.7.0;3.8.0-beta.1
com.azure.spring:azure-spring-boot-starter-servicebus-jms;3.7.0;3.8.0-beta.1
com.azure.spring:azure-spring-boot-starter-storage;3.7.0;3.8.0-beta.1
com.azure.spring:azure-spring-boot-starter;3.7.0;3.8.0-beta.1
com.azure.spring:azure-spring-boot;3.7.0;3.8.0-beta.1
com.azure.spring:azure-spring-cloud-autoconfigure;2.7.0;2.8.0-beta.1
com.azure.spring:azure-spring-cloud-context;2.7.0;2.8.0-beta.1
com.azure.spring:azure-spring-cloud-resourcemanager;2.7.0;2.8.0-beta.1
com.azure.spring:azure-spring-cloud-dependencies;2.6.0;2.7.0
com.azure.spring:azure-spring-cloud-messaging;2.7.0;2.8.0-beta.1
com.azure.spring:azure-spring-cloud-starter-cache;2.7.0;2.8.0-beta.1
com.azure.spring:azure-spring-cloud-starter-eventhubs-kafka;2.7.0;2.8.0-beta.1
com.azure.spring:azure-spring-cloud-starter-eventhubs;2.7.0;2.8.0-beta.1
com.azure.spring:azure-spring-cloud-starter-servicebus;2.7.0;2.8.0-beta.1
com.azure.spring:azure-spring-cloud-starter-storage-queue;2.7.0;2.8.0-beta.1
com.azure.spring:azure-spring-cloud-storage;2.7.0;2.8.0-beta.1
com.azure.spring:azure-spring-cloud-stream-binder-eventhubs;2.7.0;2.8.0-beta.1
com.azure.spring:azure-spring-cloud-stream-binder-servicebus-core;2.7.0;2.8.0-beta.1
com.azure.spring:azure-spring-cloud-stream-binder-servicebus-queue;2.7.0;2.8.0-beta.1
Expand Down
2 changes: 1 addition & 1 deletion sdk/boms/azure-spring-boot-bom/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This release is compatible with Spring Boot 2.5.
### New Features
- Upgrade to [spring-boot-dependencies:2.5.2](https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-dependencies/2.5.2/spring-boot-dependencies-2.5.2.pom).
- Upgrade to [azure-spring-boot-starter-keyvault-certificates:3.0.1](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/azure-spring-boot-starter-keyvault-certificates/CHANGELOG.md#301-2021-07-01).
- Upgrade to [azure-spring-boot:3.6.1](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/azure-spring-boot/CHANGELOG.md#361-2021-07-02).
- Upgrade to [azure-spring-boot:3.6.1](https://github.com/Azure/azure-sdk-for-java/blob/b6a7aba854d35d2a861dbf2786b5e41b9d3538ad/sdk/spring/azure-spring-boot/CHANGELOG.md#361-2021-07-02).
- Upgrade to [azure-spring-boot-starter:3.6.1](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/azure-spring-boot-starter/CHANGELOG.md#361-2021-07-02).
- Upgrade to [azure-spring-boot-starter-active-directory:3.6.1](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/azure-spring-boot-starter-active-directory/CHANGELOG.md#361-2021-07-02).
- Upgrade to [azure-spring-boot-starter-active-directory-b2c:3.6.1](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/azure-spring-boot-starter-active-directory-b2c/CHANGELOG.md#361-2021-07-02).
Expand Down
27 changes: 0 additions & 27 deletions sdk/spring/azure-identity-spring/README.md

This file was deleted.

75 changes: 0 additions & 75 deletions sdk/spring/azure-identity-spring/pom.xml

This file was deleted.

18 changes: 2 additions & 16 deletions sdk/spring/azure-spring-boot-starter-active-directory-b2c/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,10 @@
<description>Spring Boot Starter for Azure AD B2C and Spring Security Integration</description>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>2.5.3</version> <!-- {x-version-update;org.springframework.boot:spring-boot-starter;external_dependency} -->
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<version>2.5.3</version> <!-- {x-version-update;org.springframework.boot:spring-boot-starter-validation;external_dependency} -->
</dependency>

<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot</artifactId>
<version>3.8.0-beta.1</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot;current} -->
<artifactId>azure-spring-boot-starter</artifactId>
<version>3.8.0-beta.1</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot-starter;current} -->
</dependency>

<!-- Below poms will be replaced to azure-spring-boot-starter pom when no milestone tag. -->
Expand Down Expand Up @@ -106,8 +94,6 @@
<includes>
<include>javax.validation:validation-api:[2.0.1.Final]</include> <!-- {x-include-update;javax.validation:validation-api;external_dependency} -->
<include>org.springframework:spring-web:[5.3.9]</include> <!-- {x-include-update;org.springframework:spring-web;external_dependency} -->
<include>org.springframework.boot:spring-boot-starter:[2.5.3]</include> <!-- {x-include-update;org.springframework.boot:spring-boot-starter;external_dependency} -->
<include>org.springframework.boot:spring-boot-starter-validation:[2.5.3]</include> <!-- {x-include-update;org.springframework.boot:spring-boot-starter-validation;external_dependency} -->
<include>org.springframework.security:spring-security-config:[5.5.1]</include> <!-- {x-include-update;org.springframework.security:spring-security-config;external_dependency} -->
<include>org.springframework.security:spring-security-core:[5.5.1]</include> <!-- {x-include-update;org.springframework.security:spring-security-core;external_dependency} -->
<include>org.springframework.security:spring-security-oauth2-client:[5.5.1]</include> <!-- {x-include-update;org.springframework.security:spring-security-oauth2-client;external_dependency} -->
Expand Down
20 changes: 5 additions & 15 deletions sdk/spring/azure-spring-boot-starter-active-directory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,15 @@

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>2.5.3</version> <!-- {x-version-update;org.springframework.boot:spring-boot-starter;external_dependency} -->
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<version>2.5.3</version> <!-- {x-version-update;org.springframework.boot:spring-boot-starter-validation;external_dependency} -->
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter</artifactId>
<version>3.8.0-beta.1</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot-starter;current} -->
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<version>2.5.3</version> <!-- {x-version-update;org.springframework.boot:spring-boot-starter-webflux;external_dependency} -->
</dependency>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot</artifactId>
<version>3.8.0-beta.1</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot;current} -->
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
Expand Down Expand Up @@ -75,6 +65,8 @@
<artifactId>jackson-databind</artifactId>
<version>2.12.4</version> <!-- {x-version-update;com.fasterxml.jackson.core:jackson-databind;external_dependency} -->
</dependency>

<!-- TODO do we need reactor here-->
<dependency>
<groupId>io.projectreactor.netty</groupId>
<artifactId>reactor-netty</artifactId>
Expand All @@ -96,9 +88,7 @@
<include>com.microsoft.azure:msal4j:[1.10.1]</include> <!-- {x-include-update;com.microsoft.azure:msal4j;external_dependency} -->
<include>com.nimbusds:nimbus-jose-jwt:[9.10]</include> <!-- {x-include-update;com.nimbusds:nimbus-jose-jwt;external_dependency} -->
<include>io.projectreactor.netty:reactor-netty:[1.0.9]</include> <!-- {x-include-update;io.projectreactor.netty:reactor-netty;external_dependency} -->
<include>org.springframework.boot:spring-boot-starter-validation:[2.5.3]</include> <!-- {x-include-update;org.springframework.boot:spring-boot-starter-validation;external_dependency} -->
<include>org.springframework.boot:spring-boot-starter-webflux:[2.5.3]</include> <!-- {x-include-update;org.springframework.boot:spring-boot-starter-webflux;external_dependency} -->
<include>org.springframework.boot:spring-boot-starter:[2.5.3]</include> <!-- {x-include-update;org.springframework.boot:spring-boot-starter;external_dependency} -->
<include>org.springframework.security:spring-security-config:[5.5.1]</include> <!-- {x-include-update;org.springframework.security:spring-security-config;external_dependency} -->
<include>org.springframework.security:spring-security-core:[5.5.1]</include> <!-- {x-include-update;org.springframework.security:spring-security-core;external_dependency} -->
<include>org.springframework.security:spring-security-web:[5.5.1]</include> <!-- {x-include-update;org.springframework.security:spring-security-web;external_dependency} -->
Expand Down
Loading

0 comments on commit 89073a3

Please sign in to comment.