title | description | author | ms.service | ms.topic | ms.date | ms.author | ms.reviewer | ms.custom | zone_pivot_groups |
---|---|---|---|---|---|---|---|---|---|
Quickstart - Deploy Event-Driven Application to Azure Spring Apps | Learn how to deploy an event-driven application to Azure Spring Apps. | KarlErickson | azure-spring-apps | quickstart | 11/07/2023 | karler | rujche | devx-track-java, devx-track-extended-java, devx-track-azurecli, mode-other, engagement-fy23 | spring-apps-plan-selection |
[!INCLUDE deprecation-note]
This article applies to: ✅ Standard consumption and dedicated (Preview) ✅ Basic/Standard ✅ Enterprise
This article explains how to deploy a Spring Boot event-driven application to Azure Spring Apps.
The sample project is an event-driven application that subscribes to a Service Bus queue named lower-case
, and then handles the message and sends another message to another queue named upper-case
. To make the app simple, message processing just converts the message to uppercase. The following diagram depicts this process:
:::image type="content" source="media/quickstart-deploy-event-driven-app/diagram.png" alt-text="Diagram showing the Azure Spring Apps event-driven app architecture." lightbox="media/quickstart-deploy-event-driven-app/diagram.png" border="false":::
This article provides the following options for deploying to Azure Spring Apps:
::: zone pivot="sc-consumption-plan,sc-standard"
[!INCLUDE quickstart-tool-introduction]
::: zone-end
::: zone pivot="sc-enterprise"
- The Azure portal option is the easiest and fastest way to create resources and deploy applications with a single click. This option is suitable for Spring developers who want to quickly deploy applications to Azure cloud services.
- The Azure portal + Maven plugin option is a more conventional way to create resources and deploy applications step by step. This option is suitable for Spring developers using Azure cloud services for the first time.
- The Azure CLI option uses a powerful command line tool to manage Azure resources. This option is suitable for Spring developers who are familiar with Azure cloud services. ::: zone-end
::: zone pivot="sc-consumption-plan,sc-standard"
- An Azure subscription. [!INCLUDE quickstarts-free-trial-note]
- An Azure subscription. [!INCLUDE quickstarts-free-trial-note]
- Git.
- Java Development Kit (JDK), version 17.
- An Azure subscription. [!INCLUDE quickstarts-free-trial-note]
- Git.
- Java Development Kit (JDK), version 17.
- Azure Developer CLI (AZD), version 1.2.0 or higher.
::: zone-end
::: zone pivot="sc-enterprise"
- An Azure subscription. [!INCLUDE quickstarts-free-trial-note]
- If you're deploying an Azure Spring Apps Enterprise plan instance for the first time in the target subscription, see the Requirements section of View Azure Spring Apps Enterprise tier offering in Azure Marketplace.
- An Azure subscription. [!INCLUDE quickstarts-free-trial-note]
- If you're deploying an Azure Spring Apps Enterprise plan instance for the first time in the target subscription, see the Requirements section of View Azure Spring Apps Enterprise tier offering in Azure Marketplace.
- Git.
- Java Development Kit (JDK), version 17.
- An Azure subscription. [!INCLUDE quickstarts-free-trial-note]
- If you're deploying an Azure Spring Apps Enterprise plan instance for the first time in the target subscription, see the Requirements section of View Azure Spring Apps Enterprise tier offering in Azure Marketplace.
- Git.
- Java Development Kit (JDK), version 17.
- Azure CLI version 2.45.0 or higher.
::: zone-end
::: zone pivot="sc-consumption-plan"
[!INCLUDE deploy-event-driven-app-with-standard-consumption-plan]
::: zone-end
::: zone pivot="sc-standard"
[!INCLUDE deploy-event-driven-app-with-basic-standard-plan]
::: zone-end
::: zone pivot="sc-enterprise"
[!INCLUDE deploy-event-driven-app-with-enterprise-plan]
::: zone-end
Use the following steps to confirm that the event-driven app works correctly. You can validate the app by sending a message to the lower-case
queue, then confirm that there's a message in the upper-case
queue.
::: zone pivot="sc-consumption-plan,sc-standard"
[!INCLUDE validate-event-driven-app]
Go to the Azure Spring Apps instance Overview page and select Logs to check the app's logs.
:::image type="content" source="media/quickstart-deploy-event-driven-app/logs.png" alt-text="Screenshot of the Azure portal that shows the Azure Spring Apps Logs page." lightbox="media/quickstart-deploy-event-driven-app/logs.png":::
::: zone-end
::: zone pivot="sc-enterprise"
[!INCLUDE validate-event-driven-app]
Go to the Azure Spring Apps instance Overview page and select Logs to check the app's logs.
:::image type="content" source="media/quickstart-deploy-event-driven-app/logs.png" alt-text="Screenshot of the Azure portal that shows the Azure Spring Apps Logs page." lightbox="media/quickstart-deploy-event-driven-app/logs.png":::
Check the details for each resource deployment, which are useful for investigating any deployment issues.
[!INCLUDE validate-event-driven-app]
Go to the Azure Spring Apps instance Overview page and select Logs to check the app's logs.
:::image type="content" source="media/quickstart-deploy-event-driven-app/logs.png" alt-text="Screenshot of the Azure portal that shows the Azure Spring Apps Logs page." lightbox="media/quickstart-deploy-event-driven-app/logs.png":::
Check the details for each resource deployment, which are useful for investigating any deployment issues.
[!INCLUDE validate-event-driven-app]
Go to the Azure Spring Apps instance Overview page and select Logs to check the app's logs.
:::image type="content" source="media/quickstart-deploy-event-driven-app/logs.png" alt-text="Screenshot of the Azure portal that shows the Azure Spring Apps Logs page." lightbox="media/quickstart-deploy-event-driven-app/logs.png":::
Use the following command to check the app's log to investigate any deployment issue:
az spring app logs \ --service ${AZURE_SPRING_APPS_INSTANCE} \ --name ${APP_NAME}
::: zone-end
[!INCLUDE clean-up-resources-portal-or-azd]
[!div class="nextstepaction"] Structured application log for Azure Spring Apps
[!div class="nextstepaction"] Map an existing custom domain to Azure Spring Apps
[!div class="nextstepaction"] Set up Azure Spring Apps CI/CD with GitHub Actions
[!div class="nextstepaction"] Automate application deployments to Azure Spring Apps
[!div class="nextstepaction"] Use managed identities for applications in Azure Spring Apps
[!div class="nextstepaction"] Create a service connection in Azure Spring Apps with the Azure CLI
::: zone pivot="sc-standard, sc-consumption-plan"
[!div class="nextstepaction"] Run microservice apps (Pet Clinic)
::: zone-end
::: zone pivot="sc-enterprise"
[!div class="nextstepaction"] Introduction to the Fitness Store sample app
::: zone-end
For more information, see the following articles: