Integrate Azure and Spring with Spring Cloud Azure

Spring Cloud Azure is an open source project that provides seamless integration of Spring with Azure services. It has now reached version 4.0.
Not to be confused with Azure Spring Cloud. which is a fully managed Spring Cloud service on Azure, Spring Cloud Azure is just an SDK that provides a convenient way to interact with services provided by Azure using well-known Spring idioms and APIs for Spring developers.
Spring Cloud Azure is a bit of a loose term, but it basically brings together the following components under one umbrella:
spring cloud
- Spring Cloud Stream Binder for Azure Event Hubs (native API and Apache Kafka API)
- Spring Cloud Stream Binder for Azure Service Bus topic and queue
- Abstracting Spring Resources for Azure Storage
- Automatic configuration of Spring Cache for Azure Cache for Redis
- Spring Cloud Functions in Azure
- Spring Cloud Config for Azure application configuration
spring boot
- Spring Boot Starter for Azure Active Directory
- Spring Boot Starter for Azure Key Vault
- Spring Boot Starter for Azure Storage Store
- Spring Boot Starter for Azure Active Directory B2C
- Spring Boot Starter for Azure Cosmos DB
- Spring Boot Starter for Azure Service Bus
- Spring Boot Starter for Azure Service Bus with JMS
- Spring Boot Starter for Azure Event Hubs
Spring data
- Spring Data JPA – Azure MySQL, Azure PostgreSQL, Microsoft SQL Server
- Spring Data JDBC – Azure MySQL, Azure PostgreSQL, Microsoft SQL Server
- Spring Data MongoDB – Azure MongoDB (through Azure Cosmos DB)
- Spring Data for Apache Cassandra – Azure Cassandra (via Azure CosmosDB)
- Azure Cosmos DB data source – Azure Cosmos DB
- Spring Data Redis – Azure Cache for Redis
Spring integration
- Inbound channel adapter and message handler for Azure Event Hubs
- Inbound channel adapter and message handler for Azure Service Bus topic and queue
- Message source and message handler for Azure Storage Queue
Version 4 is a milestone that brings better security and support for production readiness, among other things. With the release of version 4, support for older versions of 3.xx, all of which have reached their end of life, is being dropped.
The changes made to v4 since 3.10 are:
Unified development experience by unifying the project name, artifact ID, and properties under com.azure.spring.
Simplified dependency management by codifying best practices and expertise from Spring experts and condensing all dependency BOMs into one, spring-cloud-azure-dependencies. Adding the Spring Cloud Azure BOM to your application is as easy as:
More flexible Spring programming model re-engineering Spring module dependencies from scratch to suit different approaches, such as using Spring Cloud Azure client libraries to interact with Azure Event Hubs.
More control and security by activating the so-called identification chain, a means of
allowing applications to obtain credentials from application properties, environment variables, managed identity, IDEs, etc., all of which help secure your applications in a programming model zero confidence.
More options exposed in an idiomatic spring fashion improving coverage of Azure SDK client auto-configuration for both synchronous and asynchronous scenarios, for example:
- spring.cloud.azure.
.customer
To configure transport clients under an Azure service SDK. - spring.cloud.azure.
.credential
To configure how to authenticate with Azure Active Directory for an Azure service SDK. - spring.cloud.azure.
.profile
To configure the Azure cloud environment for an Azure service SDK. - spring.cloud.azure.
.proxy
To configure proxy options for an Azure service SDK. - spring.cloud.azure.
.retry
To configure retry options apply to an Azure service SDK. Retry options took care of part of SDKs, there is no spring.cloud.azure.cosmos.retry.
Extending the scope of support to other Event Hubs services, Azure Cache for Redis, and App Configuration
Besides the release itself, the accompanying documentation and code samples have also been updated.Spring Cloud Azure samples and animal rescue are two such rests.
Finally, Spring Cloud Azure version 4 requires Spring Boot 2.6x and Spring Cloud version 2021.0.x, so be sure to upgrade those as well.
More information
Spring Cloud Azure 4.0 Reference Documentation
Related Articles
Ngrok Spring Boot Starter – Tunneling The Easy Way
To be informed of new articles on I Programmer, subscribe to our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or LinkedIn.
comments
or send your comment to: [email protected]