Spring Boot Starters for Azure

This article describes the various Spring Boot Starters for the Spring Initializr that provide Java developers with integration features for working with Microsoft Azure.

Azure Spring Boot Starters

The following Spring Boot Starters are currently available for Azure:

  • Azure Support

    Provides auto-configuration support for Azure Services; e.g. Service Bus, Storage, Active Directory, etc.

  • Azure Active Directory

    Provides integration support for Spring Security with Azure Active Directory for authentication.

  • Azure Key Vault

    Provides Spring value annotation support for integration with Azure Key Vault Secrets.

  • Azure Storage

    Provides Spring Boot support for Azure Storage services.

Azure Support

This Spring Boot Starter provides auto-configuration support for Azure Services; for example: Service Bus, Storage, Active Directory, Cosmos DB, Key Vault, etc.

For examples of how to use the various Azure features that are provided by this starter, see the following:

When you add this starter to a Spring Boot project, the following changes are made to the pom.xml file:

  • The following property is added to <properties> element:

    <properties>
        <!-- Other properties will be listed here -->
        <azure.version>0.2.0</azure.version>
    </properties>
    
  • The default spring-boot-starter dependency is replaced with the following:

    <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-spring-boot</artifactId>
    </dependency>
    
  • The following section is added to the file:

    <dependencyManagement>
        <dependencies>
           <dependency>
              <groupId>com.microsoft.azure</groupId>
              <artifactId>azure-spring-boot-bom</artifactId>
              <version>${azure.version}</version>
              <type>pom</type>
              <scope>import</scope>
           </dependency>
        </dependencies>
    </dependencyManagement>
    

Azure Active Directory

This Spring Boot Starter provides auto-configuration support for Spring Security in order to provide integration with Azure Active Directory for authentication.

For examples of how to use the Azure Active Directory features that are provided by this starter, see the following:

When you add this starter to a Spring Boot project, the following changes are made to the pom.xml file:

  • The following property is added to <properties> element:

    <properties>
        <!-- Other properties will be listed here -->
        <azure.version>0.2.0</azure.version>
    </properties>
    
  • The default spring-boot-starter dependency is replaced with the following:

    <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-active-directory-spring-boot-starter</artifactId>
    </dependency>
    
  • The following section is added to the file:

    <dependencyManagement>
        <dependencies>
           <dependency>
              <groupId>com.microsoft.azure</groupId>
              <artifactId>azure-spring-boot-bom</artifactId>
              <version>${azure.version}</version>
              <type>pom</type>
              <scope>import</scope>
           </dependency>
        </dependencies>
    </dependencyManagement>
    

Azure Key Vault

This Spring Boot Starter provides Spring value annotation support for integration with Azure Key Vault Secrets.

For examples of how to use the Azure Key Vault features that are provided by this starter, see the following:

When you add this starter to a Spring Boot project, the following changes are made to the pom.xml file:

  • The following property is added to <properties> element:

    <properties>
        <!-- Other properties will be listed here -->
        <azure.version>0.2.0</azure.version>
    </properties>
    
  • The default spring-boot-starter dependency is replaced with the following:

    <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-keyvault-secrets-spring-boot-starter</artifactId>
    </dependency>
    
  • The following section is added to the file:

    <dependencyManagement>
        <dependencies>
           <dependency>
              <groupId>com.microsoft.azure</groupId>
              <artifactId>azure-spring-boot-bom</artifactId>
              <version>${azure.version}</version>
              <type>pom</type>
              <scope>import</scope>
           </dependency>
        </dependencies>
    </dependencyManagement>
    

Azure Storage

This Spring Boot Starter provides Spring Boot integration support for Azure Storage services.

For examples of how to use the Azure Storage features that are provided by this starter, see the following:

When you add this starter to a Spring Boot project, the following changes are made to the pom.xml file:

  • The following property is added to <properties> element:

    <properties>
        <!-- Other properties will be listed here -->
        <azure.version>0.2.0</azure.version>
    </properties>
    
  • The default spring-boot-starter dependency is replaced with the following:

    <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-storage-spring-boot-starter</artifactId>
    </dependency>
    
  • The following section is added to the file:

    <dependencyManagement>
        <dependencies>
           <dependency>
              <groupId>com.microsoft.azure</groupId>
              <artifactId>azure-spring-boot-bom</artifactId>
              <version>${azure.version}</version>
              <type>pom</type>
              <scope>import</scope>
           </dependency>
        </dependencies>
    </dependencyManagement>
    

Next steps

To learn more about Spring and Azure, continue to the Spring on Azure documentation center.

Additional Resources

For more information about using Spring Boot applications on Azure, see Spring on Azure.

For more information about using Azure with Java, see the Azure for Java Developers and the Working with Azure DevOps and Java.

For help with getting started with your own Spring Boot applications, see the Spring Initializr at https://start.spring.io/.