This sample shows how to run Java 11 app in Azure Spring Apps
.
- Run
mvn clean package
underjava-11-sample
. - Install Azure CLI extension for Azure Spring Apps by running below command.
az extension add --name spring
- Create an instance of Azure Spring Apps.
az spring create -n <service name> -g <resource group name>
- Create an app with public domain assigned.
az spring app create -n <app name> -s <resource name> -g <resource group name> --runtime-version Java_11 --is-public true
- Deploy app with jar
az spring app deploy -n <app name> -s <resource name> -g <resource group name> --artifact-path ./target/hello-world-11-1.0-SNAPSHOT.jar
- Verify app is running. Instances should have status
RUNNING
and discoveryStatusUP
.az spring app show -n <app name> -s <resource name> -g <resource group name>
- Verify sample is working. The url is fetch from previous step.
curl {url}/{name} Hello {name}