Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix and update the doc for java-webapp to the latest #6005

Merged
merged 2 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/java/images/java-spring-cloud/signinasa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/java/images/java-webapp/create-webapp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/java/images/java-webapp/deploy-webapp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions docs/java/images/java-webapp/devicelogin.png

This file was deleted.

3 changes: 0 additions & 3 deletions docs/java/images/java-webapp/devicelogin2.png

This file was deleted.

3 changes: 3 additions & 0 deletions docs/java/images/java-webapp/login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions docs/java/java-spring-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,12 @@ If you don't have an Azure subscription, you can sign up for a [free Azure accou

<a class="install-extension-btn" href="https://azure.microsoft.com/pricing/free-trial/" target="_blank" style="background-color:#68217A">Create your free Azure account</a>

To sign in to Azure, run **Azure: Sign In** from the **Command Palette** (`kb(workbench.action.showCommands)`). You can then sign in to your account using the **Device Login** flow. Select **Copy & Open** to open your default browser.

![Azure sign in code](images/java-webapp/devicelogin.png)
To sign in to Azure, run **Azure: Sign In** from the **Command Palette** (`kb(workbench.action.showCommands)`). Or you can sign in to your Azure Account by clicking **Sign in to Azure...** in **SPRING APPS** Explorer.

Paste in the access code and continue the sign in process.

![Azure Device Login](images/java-webapp/devicelogin2.png)
![Azure sign in code](images/java-spring-cloud/signinasa.png)


### Create an app on Azure Spring Apps

Expand Down
28 changes: 16 additions & 12 deletions docs/java/java-webapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,30 +95,34 @@ The [Azure App Service](https://marketplace.visualstudio.com/items?itemName=ms-a

To install the Azure App Service extension, open the Extensions view (`kb(workbench.view.extensions)`) and search for `azure app service` to filter the results. Select the Microsoft [Azure App Service](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureappservice) extension. For a more command-line Maven-centric experience, you can also check out the [Maven plugin for Azure App Service Linux tutorial](https://learn.microsoft.com/azure/app-service/quickstart-java?pivots=platform-linux-development-environment-maven).

### Sign in to your Azure subscription

To sign in to Azure, run **Azure: Sign In** from the **Command Palette** (`kb(workbench.action.showCommands)`). Or you can sign in to your Azure Account by clicking **Sign in to Azure...** in **RESOURCES** Explorer.


![Azure sign in code](images/java-webapp/login.png)

### Create a new Web App on Azure

Once the extension is installed, you can take the following steps to create a new Web App on Azure.

1. Click **Create New Project** button on the **APP SERVICE** Explorer view.
2. Select a subscription.
3. Enter a unique name for the new Web App.
4. Select a location for the new Web App.
5. Select the OS as `Linux`.
6. Select the runtime of the Web App, for example `Tomcat 8.5 (JRE8)`.
1. Click **Create** button on the **RESOURCES** Explorer view and select "Create App Service Web App...".

2. Enter a unique name for the new Web App.

3. Select the runtime task of the Web App, for example `Java 17`.

4. Select the Java web server stack, for example `Java SE`.
5. Select a pricing tier.


![Create a Web App](images/java-webapp/create-webapp.png)

### Build and deploy to a Web App

The deploy process leverages the [Azure Account](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account) extension (installed along with the Azure App Service extension as a dependency) and you need to sign in with your Azure subscription. If you do not have an Azure subscription, [sign up today](https://azure.microsoft.com//free/?b=16.48) for a free 30 day account and get $200 in Azure Credits to try out any combination of Azure services.

To sign in to Azure, run **Azure: Sign In** from the **Command Palette** (`kb(workbench.action.showCommands)`). You can then sign in to your account using the **Device Login** flow. Select **Copy & Open** to open your default browser.

![Azure sign in code](images/java-webapp/devicelogin.png)

Paste in the access code and continue the sign in process.

![Azure Device Login](images/java-webapp/devicelogin2.png)

Once you have signed in, you can open the command prompt or terminal window and build the project using Maven commands. This will generate a new `war` or `jar` artifact in the `target` directory.

Expand Down