Deploy Spring Boot project to Azure with Azure Toolkit for IntelliJ IDEA

Опубликовано: 28 Сентябрь 2024
на канале: Brandan Jones
2,864
37

In this video, I take an existing Spring Boot Web Application, and publish it to Azure. In retrofitting an existing Spring Boot application, I found that I had to take a few steps: 0) Add the Azure Toolkit for IntelliJ to my IDEA IDE. 1) Ensure the pom.xml had packaging war. 2) Add spring-boot-starter-tomcat to the pom.xml. 3) Add SerlvetInitializer - see source below. 4) Check Java versions; ensure they are compatible with the Tomcat version to which I am going to deploy. 5) Several steps in Azure, including creating a resource group, app service plan, and creating an Azure account. After all of this, deployment is as simple as a right click!

I referenced an Azure overview video; available here:    • Azure Fundamentals: Overview  

To see more, explore the Spring Boot Microservices playlist at:    • IntelliJ IDEA, Git, Github, and .giti...  

You can also find the source code for this example on GitHub, at: https://github.com/discospiff/SpringB...
public class ServletInitializer extends SpringBootServletInitializer {

@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(EnterpriseApplication.class);
}

}