azure-sdk-for-java icon indicating copy to clipboard operation
azure-sdk-for-java copied to clipboard

[FEATURE REQ] Spring boot 4.x / spring framework 7.x compat

Open davidkarlsen opened this issue 1 year ago • 31 comments

Is your feature request related to a problem? Please describe.

Spring-boot 4.x support. While not yet released you should probably start to adopt as historically releases has been a bit slow. Example of failing calls:

java.lang.IllegalArgumentException: Unable to instantiate factory class [com.azure.spring.cloud.autoconfigure.implementation.keyvault.environment.KeyVaultEnvironmentPostProcessor] for factory type [org.springframework.boot.env.EnvironmentPostProcessor]

Describe the solution you'd like Compatability with spring-boot 4.x. Migration guide on notable changes in your SDK. Result: users can pick up the new release and make it work with SB 4.x with clear actions on how to transition from old to new version.

Describe alternatives you've considered N/A

Additional context Maybe cut some RCs to have user-base test and report back.

Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • [X] Description Added
  • [X] Expected solution specified

davidkarlsen avatar Nov 17 '25 09:11 davidkarlsen

@moarychan @netyyyy @rujche @saragluna

github-actions[bot] avatar Nov 17 '25 09:11 github-actions[bot]

Thank you for your feedback. Tagging and routing to the team member best able to assist.

github-actions[bot] avatar Nov 17 '25 09:11 github-actions[bot]

@saragluna could we follow up with @davidkarlsen and make sure to track this feature request, thanks!

samvaity avatar Nov 18 '25 22:11 samvaity

Please prioritize this request, since Spring Boot 4.0.0 is now released and this is blocking us from upgrading.

The migration guide is here.

srohlin avatar Nov 21 '25 08:11 srohlin

Same for us. I opened an issue some times ago

fleboulch avatar Nov 21 '25 11:11 fleboulch

An updated timeline for this would be much appreciated, @samvaity, @rujche @saragluna.

srohlin avatar Dec 01 '25 09:12 srohlin

Yes, would very much appreciate any indication on when this will be fixed.

alefarendsen avatar Dec 01 '25 12:12 alefarendsen

  • Here is the link to related PR: https://github.com/Azure/azure-sdk-for-java/pull/47330

rujche avatar Dec 02 '25 01:12 rujche

@rujche .. do we have snapshot version from that PR ?

anumalasri avatar Dec 02 '25 13:12 anumalasri

@anumalasri

@rujche .. do we have snapshot version from that PR ?

Do, we don't. If you want to try the developing version, you can build one by yourself from the source code in the branch in above PR.

Refs: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/README.md#build-from-source

Image

rujche avatar Dec 03 '25 01:12 rujche

Please note that Spring Boot OSS only support for 12 months.

Current Spring Boot v3.5.x is supported until June 2026. and Spring Boot v4.0 will end by Nov 2026.

Its cycle of 6 month to migrate onto new versions of Spring Boot.

Please let consumers know if Azure/Microsoft is unable to comply that schedule.

anumalasri avatar Dec 03 '25 02:12 anumalasri

@anumalasri

Please note that Spring Boot OSS only support for 12 months.

Current Spring Boot v3.5.x is supported until June 2026. and Spring Boot v4.0 will end by Nov 2026.

Thanks for pointing this out. We know that. Here is the related link and screenshot: https://spring.io/projects/spring-boot#support

Image

Its cycle of 6 month to migrate onto new versions of Spring Boot.

What does this mean?

Please let consumers know if Azure/Microsoft is unable to comply that schedule.

Our current plan is to always make the Spring Cloud Azure library supports the OSS supported Spring Boot version. Detailed information about version mapping from Spring Boot to Spring Cloud Azure can be found in this page: https://github.com/Azure/azure-sdk-for-java/wiki/Spring-Versions-Mapping

rujche avatar Dec 03 '25 02:12 rujche

Note that, some of us may need couple of months to test before we consume these versions. We can't take our chances to go out of OSS support, due to major version changes.

Can you please publish timeline to support Spring Boot v4, to help enterprises to plan accordingly ?

anumalasri avatar Dec 08 '25 16:12 anumalasri

@anumalasri

Our current plan is to release Spring Cloud Azure 7.x which supports Spring Boot 4.x. The ETA is before the end of this month. I'll add a comment in current issue when Spring Cloud Azure 7.x is released.

rujche avatar Dec 09 '25 01:12 rujche

The PR above has been merged. What is the plan now?

fleboulch avatar Dec 24 '25 08:12 fleboulch

@fleboulch

The PR above has been merged. What is the plan now?

Spring Cloud Azure 7.0.0-beta.1 is released to maven central repository. But some doc updating work is still in progress. If you don't want to wait for the doc for 7.0.0-beta.1, you can have a try now. Here is the link: https://mvnrepository.com/artifact/com.azure.spring/spring-cloud-azure-autoconfigure

Image

rujche avatar Dec 24 '25 09:12 rujche

As someone also looking into upgrading to Spring Boot 4, I utilized the beta version of the Spring Cloud Azure AutoConfigure. It solved an initial problem I was seeing, which had the same message as the initial issue in this thread.

Image

However, I then ran into a second issue where my SecretCient seeks out the versions of my secret key, and it threw this exception:

Image

I am utilizing Spring Boot 4.0.0 on Java 21, utilizing Spring Web Flux, and building with Gradle 8.14. This is the first time I am seeing this issue.

TrecApps avatar Dec 26 '25 05:12 TrecApps

Hi, @TrecApps

As someone also looking into upgrading to Spring Boot 4, I utilized the beta version of the Spring Cloud Azure AutoConfigure. It solved an initial problem I was seeing, which had the same message as the initial issue in this thread.

Image However, I then ran into a second issue where my SecretCient seeks out the versions of my secret key, and it threw this exception: Image I am utilizing Spring Boot 4.0.0 on Java 21, utilizing Spring Web Flux, and building with Gradle 8.14. This is the first time I am seeing this issue.

Could you please create a new issue with the detailed steps to reproduce this problem? It's better to provide a minimal project to reproduce this problem. And could you please check whether your secret name have invalid character?

Image

rujche avatar Dec 29 '25 07:12 rujche

I attempted to recreate the issue in an isolated project, and while doing so, I discovered the issue in my original project. I was including a dependency that is no longer needed.

implementation "io.netty:netty-codec-http:4.2.8.Final"

removing (or commenting out) the above line allowed the app to avoid the java.lang.IllegalArgumentException: The URI contains illegal characters issue I was seeing earlier.

I am attaching my basic project akv-Spring-boot-4-issue, even if you decide you no longer need it.

TrecApps avatar Dec 30 '25 04:12 TrecApps

Hi @rujche , Thanks for updates on spring cloud azure. Me and My team looking for final version release on Spring Cloud Azure, which helps in migration of multiple services to Spring Boot4.0, Please may I know any ETA on stable version release.

thirupathiBavanla avatar Jan 02 '26 06:01 thirupathiBavanla