×
=0) { let js = text.slice(pos1, pos2); + '<\/' + "script" + '>'; arrText.push(js); // next pos1 = pos2; continue; } } } break; } return arrText; } function OpenDialog(parentDiv, urlContent) { parentDiv = document.getElementById('modal-background'); // new !!!!!!! parentDiv.appendChild(document.getElementById('modal-template')); document.getElementById('modal-background').style.display = "block"; document.getElementById('modal-template').style.display = "flex"; // !!!!! document.getElementById('modal-body').innerHTML = ""; post_url(urlContent, "", function(text_from_server) { var element = document.getElementById('modal-body'); element.innerHTML = text_from_server; // add scripts var arrJSText = get_scripts(text_from_server); for (var i=0; i
dir.by
Search
Programming, development, testing
→
Java
→
Spring in Java (Spring Framework, Spring Data, Spring Boot, ...)
→
Put the Java Spring web application in Azure
Looked at
828
times
Put the Java Spring web application in Azure
last updated: 22 April 2025
Step 1. Download the application Java Spring Web
Download the
Java Spring Web
application ...
Step 2. Download Apache Maven
Note!
Apache Maven
puts
Java Spring Web
the appendix in
Azure
.
You can download
Apache Maven
from the official website
https://maven.apache.org
or
can be downloaded
apache-maven-3.9.9-bin.zip
...
After downloading
Apache Maven
, I will unzip and rewrite all the files to the
C:/Program Files/apache-maven-3.9.9
That is, it will turn out like this:
C:
Program Files
apache-maven-3.9.9
bin
boot
conf
lib
LICENSE
NOTICE
README.txt
Step 3. Run the command prompt
In
Windows
, run the command line:
Step 4. At the command prompt, run Apache Maven (to create the Azure configuration in pom.xml)
Importantly!
Azure
with the type
Java
you should have created like this...
I have the application
Java Spring Web
here
D:/MySpringWeb
On the command line, switch to the directory where the
Java Spring Web
application is located:
D:
cd D:/MySpringWeb
At the command prompt, run
Apache Maven
to create a
Azure
configuration in
pom.xml
c:/PROGRA~1/apache-maven-3.9.9/bin/mvn com.microsoft.azure:azure-webapp-maven-plugin:2.13.0:config
After this command, there will be questions: we answer
We take the answers from the site
Azure
...
Open
https://portal.azure.com
After running the command line and our answers, a section will be added to
pom.xml
<plugin>
<groupId>com.microsoft.azure</groupId>
...
Open the
D:/MySpringWeb/pom.xml
file and see that the
Azure
configuration has been created:
Xml
pom.xml
<?xml
version=
"1.0"
encoding=
"UTF-8"
?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
3.4.4
</version>
<relativePath/>
<!-- lookup parent from repository -->
</parent>
<groupId>
org.example
</groupId>
<artifactId>
MySpringWeb
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<name>
MySpringWeb
</name>
<description>
MySpringWeb
</description>
<url/>
<licenses>
<license/>
</licenses>
<developers>
<developer/>
</developers>
<scm>
<connection/>
<developerConnection/>
<tag/>
<url/>
</scm>
<properties>
<java.version>
17
</java.version>
</properties>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
<plugin>
<groupId>
com.microsoft.azure
</groupId>
<artifactId>
azure-webapp-maven-plugin
</artifactId>
<version>
2.13.0
</version>
<configuration>
<schemaVersion>
v2
</schemaVersion>
<resourceGroup>
MyResourceGroup1
</resourceGroup>
<appName>
my-java-spring1
</appName>
<pricingTier>
F1
</pricingTier>
<region>
centralus
</region>
<runtime>
<os>
Linux
</os>
<javaVersion>
Java 17
</javaVersion>
<webContainer>
Java SE
</webContainer>
</runtime>
<deployment>
<resources>
<resource>
<directory>
${project.basedir}/target
</directory>
<includes>
<include>
*.jar
</include>
</includes>
</resource>
</resources>
</deployment>
</configuration>
</plugin>
</plugins>
</build>
</project>
Sometimes, when I entered it incorrectly, I correct the
pom.xml
file myself:
<resourceGroup>MyResourceGroup1</resourceGroup>
<appName>my-java-spring1</appName>
You can read more on the website:
microsoft.com ..
Step 5. At the command prompt, run Apache Maven (for publish in Azure)
Command Prompt (Win Console)
c:/PROGRA~1/apache-maven-3.9.9/bin/mvn package com.microsoft.azure:azure-webapp-maven-plugin:2.13.0:deploy
Result
Open the link
https://my-java-spring1-argsbxh5hkefc5a6.germanywestcentral-01.azurewebsites.net
My
web
app needs
/home
We see that everything works:
← Previous topic
Create Azure Web App with the type Java (free). That is, create an empty web server
Next topic →
Connect to the application Azure Web App (Java) via FTP | use File Explorer
Your feedback ... Comments ...
Your Name
Your comment
(www links can only be added by a logged-in user)
+ Picture
Объявления
Объявления
Download and install
•
Installation JDK (download and install the Java library for Windows)
•
Download and install IntelliJ IDEA to explore Java, Spring, Jakarta EE | Functionality and differences: Community | Ultimate
Learn the language Java (class, interface, properties, etc.)
•
Create a simple console app in IntelliJ IDEA to learn Java
•
What is interface in Java ?
•
Directly in the code (at runtime) we make an implementation for the interface | Java
Java web application (servlet, jsp page, basic functionality and no frameworks)
•
Creating a new simple web application (jsp web page) | Java, Maven
•
Create a web servlet (the servlet is located on the web server, returns the result on request) | Java
•
Installation Tomcat web server (download and install for Windows)
•
Check, test Tomcat web server (create a new my.hml file)
•
What is Maven
•
What is a dynamic web page jsp (Java Server Page) ?
•
How to install Smart Tomcat plugin in Intellij Idea
•
Error "The SDK is not specified for module ... | Project SDK is not defined ..." in IntelliJ IDEA | Java
Spring in Java (Spring Framework, Spring Data, Spring Boot, ...)
•
What is Spring? Why use Spring in Java?
•
What is Spring Bean? What is Spring Container? IoC (inversion of control) | Creating a simple Spring project and configuration Spring Container in an XML file | Editor IntelliJ Idea and language Java
•
What is Dependency Injection in Spring? Creating a simple Spring project with Dependency Injection in the constructor with the attributes @Component, @Autowired | Editor IntelliJ Idea and language Java
•
Creating a new Spring web application (Controller responds to request) | Java, Spring Web, Spring Boot, Maven
•
Creating a new Spring WebSocket application (Java WebSocket sends a message to the JavaScript WebSocket) | Java, Spring WebSocket, Spring Boot, Maven
•
Create Azure Web App with the type Java (free). That is, create an empty web server
•
Put the Java Spring web application in Azure
•
Connect to the application Azure Web App (Java) via FTP | use File Explorer
•
Error "The SDK is not specified for module ... | Project SDK is not defined ..." in IntelliJ IDEA | Java, Spring Boot
•
How to install Spring WebSocket plugin in Intellij Idea
Jakarta EE / Java EE in Java (Web Applications, Web Services)
•
What is Jakarta EE (Java EE)? | In which editor (program) is it convenient to write Jakarta EE (Java EE) code?
•
Creating a simple web project in IntelliJ Idea Ultimate | Jakarta EE (Java EE)
Struts in Java (extends API Java Servlet using MVC)
•
What is Struts | Java
•
Interviews on Java
Ваши вопросы присылайте по почте:
info@dir.by