Skip to content

Java Recipes Overview

Accelerate your development process with these common integration patterns and production recipes for Java (Spring Boot) applications on Azure Container Apps.

flowchart TD
    APP["Spring Boot App"] --> DB["Database (Cosmos DB / SQL)"]
    APP --> CACHE["Redis Cache"]
    APP --> MSG["Service Bus"]
    APP -.-> MI[Managed Identity]
    MI -.-> KV[Azure Key Vault]
    APP --> DAPR[Dapr Sidecar]

Integration Patterns

Azure Container Apps provides a flexible platform for building distributed systems. These recipes demonstrate how to integrate your Spring Boot application with other Azure services and platform features.

1. Database Integration

  • Azure Cosmos DB: Securely connect to NoSQL databases using Managed Identity and RBAC.
  • Azure SQL: Relational database integration with Microsoft Entra authentication and JDBC.

2. Messaging and Caching

  • Redis Cache: High-performance distributed caching with Microsoft Entra authentication and TLS.
  • Service Bus (Coming Soon): Reliable messaging for asynchronous communication and event-driven architectures.

3. Platform Features

  • Dapr Integration (Coming Soon): Building distributed microservices using the Dapr framework for service invocation and state management.
  • Custom Domains: Map your own branded URLs and TLS certificates to your Java apps.
  • Storage Integration: Use Azure Blob Storage from Java applications on Container Apps.

4. Security and Identity

  • Key Vault Integration (Coming Soon): Securing application secrets and configuration using Azure Key Vault.
  • Managed Identity (Coming Soon): Implementing "Zero-Trust" security by removing connection strings and using Azure RBAC.

Choosing the Right Recipe

Need Recommended Recipe
Storing relational data Azure SQL
Scaling distributed caches Redis Cache
Implementing microservices Dapr Integration
Securing secrets Key Vault Integration

Best Practices for Java Recipes

  • Spring Cloud Azure: Use the Spring Cloud Azure libraries for seamless integration with Azure services.
  • Passwordless Auth: Always prioritize Managed Identity over connection strings and API keys.
  • Auto-configuration: Leverage Spring Boot's auto-configuration to reduce boilerplate code for service integrations.

Use Spring Initializr for quick starts

When building new microservices, use Spring Initializr to add the necessary Azure dependencies to your pom.xml from the start.

See Also

Sources