spring-bootazurespring-initializrspring-cloud-azure

Spring Initializer for Spring Boot 3.5.0 no longer allows adding Azure Active Directory


The Spring Initializer site indicates that Azure Active Directory can only be chosen for Spring Boot >= 3.3.0 and < 3.5.0-M1.

Azure Active Directory would add the following:

ext {
  set('springCloudAzureVersion', "5.22.0")
}

dependencies {
  implementation 'com.azure.spring:spring-cloud-azure-starter-active-directory'
  ...
}

dependencyManagement {
  imports {
    mavenBom "com.azure.spring:spring-cloud-azure-dependencies:${springCloudAzureVersion}"
  }
}

I wasn't able to find any resources online about it, and everything seems to be working fine if I update an existing application to Spring Boot 3.5.0 that already has the dependency.


Solution

  • Spring Initializr’s “Add Azure Active Directory” option is driven by metadata in the Spring Cloud Azure starter, which declares exactly which Spring Boot versions are supported. As of the latest Spring Cloud Azure release (5.22.0), that starter only lists compatibility up through Spring Boot 3.4.x—specifically, 5.22.0 depends on Spring Boot 3.4.4. There is no published Spring Cloud Azure version that formally supports Spring Boot 3.5.0 yet please refer this github link.

    Because Initializr reads those compatibility rules at project‐creation time, it will hide the Azure Active Directory checkbox whenever you pick Spring Boot 3.5.0. In other words, until a Spring Cloud Azure BOM is released that names Spring Boot 3.5.0 as a valid target, Initializr will refuse to offer the “azure-active-directory” starter for that Boot version.

    This forces Gradle (or Maven) to pull in Spring Cloud Azure 5.22.0, which is designed to work on Boot 3.4.x and in practice, it will also work just fine on 3.5.0 unless there is a breaking change in Boot itself.

    As soon as the Spring Cloud Azure team publishes a new version (for example, 5.23.x) that explicitly declares support for Spring Boot 3.5.0 in its metadata, Initializr will once again display the “Azure Active Directory” option for that Boot version. Until then, generating with 3.4.x or adding the starter by hand are the two most straightforward workarounds.