[Java] Deploy the Spring Boot application to Azure App Service


Deploy the Spring Boot web app to Azure App Service.


Deploy what you created as a Spring starter project in Eclipse + Gradle.

Creating an App Service

-Match the Tomcat and Java versions with the web application. -If the OS is Windows, it is convenient because the App Service Editor can be used.

Creating a War file

Create a Deployable War File https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-create-a-deployable-war-file

Create a deployable war file according to the above procedure. Make the class with @SpringBootApplication inheritSpringBootServletInitializer. Also, add the war plugin to build.gradle and set Tomcat to providedRuntime.


apply plugin: 'war'

dependencies {
	//Don't include tomcat in war
	providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'

Execute the'bootWar' task and create a war file. 01.PNG

Put the WAR file on Azure

Easy with the App Service Editor. App Service Editor is a tool that allows you to directly edit files on App Service with a GUI like Visual Studio Code. It can be used only when the OS of App Service is Windows.

If there is already a ROOT folder, delete it.

Drag and drop the created WAR file to the Explorer part of the App Service Editor and upload it.

You can also upload by right-clicking in the upload destination folder or in the margin of Explorer → "Upload File". After waiting for a while, the WAR file will be expanded.

Bonus: How to deploy a jar file with tomcat

Spring Boot Deployment On Azure App Service — Zero Code Approach https://medium.com/@k32y/spring-boot-deployment-on-azure-app-service-zero-code-approach-88305c8d0818

Recommended Posts

[Java] Deploy the Spring Boot application to Azure App Service
Deploy the application created by Spring Boot to Heroku (public) ②
Deploy the application created by Spring Boot to Heroku (public) ①
Deploy Java web app to Azure with maven
Deploy the WEB application by Spring Boot to Tomcat server as WAR
CICS-Run Java application-(4) Spring Boot application
Deploy the Spring Boot project to Tomcat on XAMPP
Deploy Spring Boot applications to Heroku without using the Heroku CLI
Minimal configuration to run Spring Boot application on Azure Web Apps
Deploy Rails apps to Azure App Service using Docker & Continuous Deployment
Add Document to Azure Search Service (Java)
Java beginner tried to make a simple web application using Spring Boot
Automatically deploy a web application developed in Java using Jenkins [Spring Boot application]
Introduction to Java development environment & Spring Boot application created with VS Code
Try calling the CORBA service from Spring (Java)
The story of raising Spring Boot 1.5 series to 2.1 series
[Java / PostgreSQL] Connect the WEB application to the database
[Java] Article to add validation with Spring Boot 2.3.1.
Deploy a Spring Boot application on Elastic Beanstalk
[Spring Boot] How to refer to the property file
Sign in to a Spring Boot web application on the Microsoft ID platform
[Azure] I tried to create a Java application for free-Web App creation- [Beginner]
How to set environment variables in the properties file of Spring boot application
Spring Boot 2.3 Application Availability
Create a portfolio app using Java and Spring Boot
How to run the SpringBoot app as a service
05. I tried to stub the source of Spring Boot
Deploy Java apps on the IBM Cloud Kubernetes service
I tried to reduce the capacity of Spring Boot
Get Azure App Service for Java Configuration with System.getEnv ()
Leverage Spring AOP + CyclicBarrier to ensure optimistic lock testing conditions on the Spring Boot app
[2018 definitive edition] [Java 11 containerization] After downsizing the Spring Boot application to the limit, build it with Jib and push it to ECR
The story of raising Spring Boot from 1.5 series to 2.1 series part2
Try Spring Boot from 0 to 100.
About the function of Spring Boot due to different versions
Deploy a Java application developed locally with the Cloud Toolkit to an Alibaba Cloud ECS instance
How to deploy a simple Java Servlet app on Heroku
20190803_Java & k8s on Azure The story of going to the festival
[Spring Boot] Web application creation
[Java] Thymeleaf Basic (Spring Boot)
Introduction to Spring Boot ① ~ DI ~
Introduction to Spring Boot ② ~ AOP ~
How to call and use API in Java (Spring Boot)
How to deploy a kotlin (java) app on AWS fargate
Deploy your application to WildFly
How to deploy Java application to Alibaba Cloud EDAS in Eclipse
Introduction to Spring Boot Part 1
[Java] [Spring] Spring Boot 1.4-> 1.2 Downgrade Note
Input to the Java console
Create a Spring Boot web app that uses IBM Cloudant and deploy it to Cloud Foundry
[Java] Get data from DB using singleton service in Spring (Boot)
What I did in the migration from Spring Boot 1.4 series to 2.0 series
What I did in the migration from Spring Boot 1.5 series to 2.0 series
I want to control the default error message of Spring Boot
I was able to deploy the Docker + laravel + MySQL app to Heroku!
Spring Boot + Java + GitHub authentication login
Spring Boot application development in Eclipse
Spring Boot application code review points
Spring Boot for the first time
[java8] To understand the Stream API
Create an app with Spring Boot 2