Quickstart: Launch your first Java application in Azure Container Apps
Article
This article shows you how to deploy the Spring PetClinic sample application to run on Azure Container Apps. Rather than manually creating a Dockerfile and directly using a container registry, you can deploy your Java application directly from a Java Archive (JAR) file or a web application archive (WAR) file.
By the end of this tutorial you deploy a web application, which you can manage through the Azure portal.
The following image is a screenshot of how your application looks once deployed to Azure.
The default JDK version is 17. If you need to change the JDK version for compatibility with your application, you can use the --build-env-vars BP_JVM_VERSION=<YOUR_JDK_VERSION> argument to adjust the version number.
The default Tomcat version is 9. If you need to change the Tomcat version for compatibility with your application, you can use the --build-env-vars BP_TOMCAT_VERSION=<YOUR_TOMCAT_VERSION> argument to adjust the version number.
In this example, the Tomcat version is set to 10 (including any minor versions) by setting the BP_TOMCAT_VERSION=10.* environment variable.
In this example, containerapp up command includes the --query properties.configuration.ingress.fqdn argument, which returns the fully qualified domain name (FQDN), also known as the app's URL.
View the application by pasting this URL into a browser. Your app should resemble the following screenshot.
Start here and learn how you can build, migrate and scale Java applications on Azure using Azure services. Use tools and frameworks that you know and love – Spring, Tomcat, WildFly, JBoss, WebLogic, WebSphere, Maven, Gradle, IntelliJ, Eclipse, Jenkins, Terraform and more.
Build end-to-end solutions in Microsoft Azure to create Azure Functions, implement and manage web apps, develop solutions utilizing Azure storage, and more.