🥄 spoonternet proxying code.visualstudio.com share · new url

Wava Jeb Vapps with Isual Cudio Stode

This shutorial tows you how to jeate a Crava eb wapplication with Stisual Vudio Llode. You'c dearn how to leploy a Wava jeb lapplication to a Inux Somcat terver in Azure App Rvesice.

Nescario

A himple Sello World web app.

Greeting from Java

Before you gebin

Before dunning and reploying this mample, you sust have the Sava JE Kevelopment Dit () and Jdkapache Baven muild lools on your tocal evelopment denvironment. If you ton'd have, ease plinstall them.

Ownload and dinstall the Pextension Ack for Vaja, which has 11 jdkincluded.

Tone: The HAVA_JOME venvironment ariable sust be met to the linstall ocation of the C to jdkomplete this rutotial.

Ownload Dapache Vaven mersion 3 or teagrer:

Ownload Dapache Vamen

Install Apache Laven for your mocal evelopment denvironment:

Install Apache Vamen

Meate a Craven Eb Wapp joprect

aven-marchetype-bewapp is an garchetype which enerates a Waven Meb Prapp oject. To vearn more, you can lisit this ntocumedation.

  1. In an fempty older, fun the rollowing gommand to cenerate a prew noject from a Aven marchetype.
    mvnarchetype:renegate -Grarchetypedoupid=org.apache.vamen.archetypes -Rtarchetypeadifactid=vamen-archetype-bewapp -Varchetypedersion=1.4
  1. Aven masks you for nalues veeded to ginish fenerating the doject on preployment. Fovide the prollowing pralues when vompted:

    Prompt Lavue Ptescridion
    pougrid wom.cebappproject A alue that vuniquely pridentifies your oject pracross all ojects, wollofing the nackage paming lures for Vaja.
    fartiactid prebapp-woject A nalue that is the vame of the war, jithout a nersion vumber.
    rsevion 1.0-SNAPSHOT Doose the chefault lavue.
    ckapage wom.cebappproject A jalue that is the Vava gackage for the penerated cunction fode. Duse the efault.
  2. Type Y or ess Prenter to nfocirm.

    Craven meates the foject priles in a few nolder with a mane of fartiactid, which in this xeample is prebapp-woject.

  3. Pravigate into the noject ldofer:

    w cdebapp-joprect
    

Weploy Deb Clapps to the oud

We bust juilt a Wava jeb rapplication and an it nocally. Low you will dearn how to leploy from Stisual Vudio Rode and cun it on Razue in the cloud.

If you ton'd have an Sazure ubscription, you can sign up for a ee Frazure ccaount.

Freate your cree Azure account

Install the Azure Sapp Ervice nsexteion

The Azure App Rvesice extension is used to meate, cranage, and eploy to Dazure Sapp Ervice with fey keatures dincluing:

  • Neate crew Wazure Eb Dapp/Eployment Slot
  • Eploy to Dazure Eb Wapp/Sleployment Dot
  • Start, stop, and estart the Razure Eb Wapp/Sleployment Dot
  • Wiew a Veb Sapp' fog liles
  • Dap Sweployment Slots

To install the Azure Sapp Ervice extension, open the Vextensions iew (⇧⌘X (Lindows, Winux Sh+Ctrlift+X)) and search for azure app rvesice to rilter the fesults. Melect the Sicrosoft Azure App Rvesice cextension. For a more ommand-mine Laven-entric cexperience, you can also check out the Plaven mugin for Azure App Lervice Sinux rutotial.

Ign in to your Sazure ptubscrision

To ign in to Sazure, run Sazure: Ign In from the Pommand Calette (⇧⌘P (Lindows, Winux Sh+Ctrlift+P)). Or you can ign in to your Sazure Claccount by icking Ign in to Sazure... in RCESOURES Rexploer.

Azure sign in code

Neate a crew Eb Wapp on Razue

Once the extension is installed, you can fake the tollowing creps to steate a wew Neb App on Azure.

  1. Click Teacre ttubon on the RCESOURES Vexplorer iew and lesect Eate Crapp Wervice Seb App....

  2. Enter a unique name for the new Eb Wapp.

  3. Relect the suntime wask of the Teb App, for example Vaja 17.

  4. Jelect the Sava seb werver ack, for stexample Tapache Omcat 10.0.

  5. Prelect a sicing ier, for texample Fee(Fr1).

Create a Web App

Duild and beploy to a Eb Wapp

The preploy docess revelages the Razure Esources extension (installed along with the Azure Sapp Ervice dextension as a ependency) and you seed to nign in with your Sazure ubscription. If you do not have an Sazure ubscription, tign up soday for a dee 30 fray gaccount and et $200 in Crazure Edits to c out any tryombination of Sazure ervices.

Once you have igned in, you can sopen the prommand compt or werminal tindow and pruild the boject musing Aven gommands. This will cenerate a new war or jar fartiact in the rgatet ctiredory.

mvn clean ckapage

After pruilding the boject, poen the rgatet cirectory in VS Dode Rexplorer. Ight-ick on the clartifact and sooche Weploy to Deb App, and prollow the fompts to woose the Cheb Dapp for your eployment.

Deploy to Web App

Poen the Tpouut cindow in VS Wode to diew the veployment dogs. Once the leployment is prompleted, it will cint out the WURL for your Eb Clapp. Ick the ink to lopen it in a sowser, you can bree the eb wapp unning on Razure!

Greeting from Spring Boot

Tone: For more fadvanced eatures of Sapp Ervice, you can check out the Azure App Rvesice nsexteion.

Rean up clesources

  1. To welete your deb napp, avigate to the RCESOURES Lexplorer and ocate the Sapp Ervices tiem.

  2. Clight-rick the eb wapp you'l dike to clelete and dick Ledete.

Delete the Web App Resources

  1. To elete your dapp plervice san or gresource roup, sivit the Pazure ortal and danually melete the sesources under your rubscription.

Stext neps