Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQ] Replace all the Spring Boot 3 and Spring Cloud 2022.0.0 deprecated APIs #31330

Closed
moarychan opened this issue Oct 8, 2022 · 4 comments · Fixed by #31543
Closed
Assignees
Labels
azure-spring All azure-spring related issues azure-spring-docs Client This issue points to a problem in the data-plane of the library. feature-request This issue requires a new behavior in the product in order be resolved.
Milestone

Comments

@moarychan
Copy link
Member

Context

After the first beta version to support Spring Boot 3, we should improve the source code that is using deprecated APIs, because these deprecated APIs will be removed soon in the next Spring Boot and Spring Cloud milestone versions.

Goal

This issue will target the below sub-goals:

  • Enable the maven plugin maven-compiler-plugin to find the new deprecated APIs and ensure all the old ones be instead.
  • Try to keep the existing features and functions unchanged after the APIs change.
  • Cover all the modules under the directory sdk/spring.
@moarychan moarychan added Client This issue points to a problem in the data-plane of the library. feature-request This issue requires a new behavior in the product in order be resolved. azure-spring All azure-spring related issues azure-spring-docs labels Oct 8, 2022
@moarychan moarychan added this to the 2022-11 milestone Oct 8, 2022
@moarychan moarychan self-assigned this Oct 8, 2022
@moarychan
Copy link
Member Author

There's an exception when compiling the sdk/spring modules based on Java 17, because the parent configuration of the plugin maven-compiler-plugin will take extra executions for Java 8, Java 11, it should be overridden in the subproject to disable the low Java version compilation. Related PR: #31410

@moarychan
Copy link
Member Author

moarychan commented Oct 19, 2022

Update the detailed changes

Removed deprecations

  • Removed class com.azure.spring.cloud.autoconfigure.aad.implementation.oauth2.AadOAuth2AuthenticatedPrincipal.
  • Removed class com.azure.spring.cloud.autoconfigure.aad.implementation.webapi.AadOboOAuth2AuthorizedClientProvider.
  • Removed class com.azure.spring.cloud.autoconfigure.aad.properties.AadAuthorizationGrantType.
  • Removed class com.azure.spring.cloud.autoconfigure.aad.AadJwtBearerTokenAuthenticationConverter.
  • Removed the AuthorizationGrantType.PASSWORD support.
  • Removed the auto-configure for Spring Cloud Sleuth support.
  • Removed artifact spring-cloud-azure-trace-sleuth.

Replaced deprecated APIs, the last two bold items need further review:

  • Use com.nimbusds.jwt.proc.DefaultJWTClaimsVerifier#DefaultJWTClaimsVerifier(com.nimbusds.jwt.JWTClaimsSet, java.util.Set<java.lang.String>) instead of com.nimbusds.jwt.proc.DefaultJWTClaimsVerifier#DefaultJWTClaimsVerifier().
  • Use org.springframework.http.ResponseEntity#getStatusCode instead of org.springframework.http.ResponseEntity#getStatusCodeValue.
  • Use com.azure.core.util.ConfigurationBuilder#ConfigurationBuilder() instead the default constructor method com.azure.core.util.Configuration#Configuration().
  • Use a bean SecurityFilterChain instead of the implementation of org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.

@moarychan
Copy link
Member Author

A deprecated API is temporarily ignored, already opened an issue to track #31571

@moarychan
Copy link
Member Author

Closing this issue due to the PRs merged.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
azure-spring All azure-spring related issues azure-spring-docs Client This issue points to a problem in the data-plane of the library. feature-request This issue requires a new behavior in the product in order be resolved.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant