Skip to content

Latest commit

 

History

History
105 lines (71 loc) · 2.9 KB

File metadata and controls

105 lines (71 loc) · 2.9 KB

Deploy a Spring Boot Application using managed JavaSE

appservice/javase-springboot/README.md

Prerequisites

This example assumes you have previously completed the following examples:

  1. Create an Azure Resource Group
  2. Create an Azure App Service Plan

Build the example

To build the JAR file use the following Maven command line.

  mvn package

Run example locally

To run the example locally use the following Maven command line.

  mvn spring-boot:run

You can see the application in action at http://localhost:8080/

Deploy the Spring Boot Application

To deploy the example use the following Maven command line:

  export APPSERVICE_JAVASE_SPRINGBOOT=joazappsvc-javase-springboot-$RANDOM

  mvn azure-webapp:deploy \
    -DappName=$APPSERVICE_JAVASE_SPRINGBOOT \
    -DappServicePlan=$APPSERVICE_PLAN \
    -DresourceGroup=$RESOURCE_GROUP

Once the command completes you will be able to see the example by using your web browser and going to the xxxxx.azurewebsites.net address the command echoes.

Properties supported by the example

The example supports the following properties that you can pass in as -Dname=value to the Maven command line to customize your deployment.

name description
appName the Application Name
appServicePlan the App Service plan to use
resourceGroup the Resource Group to use

Cleanup

Do NOT forget to remove the resources once you are done running the example.