Table of contents
1.
Introduction
2.
Pre-migration
2.1.
Change to a supported platform
2.2.
External resources should be inventoried.
2.2.1.
Databases
2.2.2.
Message brokers for JMS
2.2.3.
Determine external caches
2.2.4.
Identity service providers
2.2.5.
All other outside resources
3.
Secrets of inventory
3.1.
Secure strings and passwords
3.2.
Certificates of inventory
4.
Determine whether or not the file system is being used
4.1.
Static read-only content
4.2.
Static content that is dynamically published.
5.
Special Situations
5.1.
Determine whether the application is dependent on scheduled jobs.
5.2.
Check to see if your application contains any OS-specific code.
5.3.
Identify all external processes/daemons that are running on the production server (s)
5.4.
Determine how non-HTTP requests or multiple ports are handled.
6.
Migration
6.1.
Configure the configuration
6.2.
App Service plan
6.3.
​​Create and Deploy a Web Application (s)
6.3.1.
Applications for Maven
6.3.2.
Maven-independent applications
7.
Post-migration
7.1.
Recommendations
8.
Frequently Asked Questions
8.1.
What is the purpose of Azure App Service?
8.2.
What exactly is a spring boot?
8.3.
Does Microsoft make use of spring boots?
8.4.
What exactly is Azure batch service?
8.5.
Is Azure App Service a Software as a Service?
9.
Conclusion
Last Updated: Aug 13, 2025
Easy

Spring Boot to Azure App Service

Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

This article teaches you about Spring  Boot to Azure App Service. Here we understand the considerations you should make while transferring an existing Spring Boot application to Azure App Service.

Spring Cloud Azure's open-source project enables easy Spring integration with Azure services. With minimal code changes, it provides developers with a Spring-idiomatic approach to connecting to and using Azure services.

Introduction

Pre-migration

Before you begin, inventory activities are outlined in the following sections to ensure a successful migration.

See the accompanying migration recommendations below if you are unable to fulfill any of these pre-migration requirements:

  • Application migration to Azure Kubernetes Service: containers for executable JAR apps (guidance planned).
     
  • Apply Azure Virtual Machines to executable JAR applications (guidance planned)

Change to a supported platform

App Service provides specific Java SE versions. Before proceeding with the remaining steps, migrate your application to one of the supported versions of its current environment to ensure compatibility. Make sure to test the resulting configuration thoroughly. In such tests, use your Linux distribution's most recent stable release.

Note: This is especially important if your current server runs an unsupported JDK (such as Oracle JDK or IBM OpenJ9).

To obtain your current Java version, log in to your production server and run the following command:

java -version

Eclipse Temurin provides binaries for Java 8 on Azure App Service. App Service offers the Microsoft Build of OpenJDK for Java 11, 17, and all future Java LTS releases.

Java LTS releases.

External resources should be inventoried.

Determine the existence of external resources such as data sources, service URLs, and JMS message brokers. In Spring Boot applications, the configuration for such help is typically found in the src/main/directory folder, in a file called application.properties or application.yml. Check the environment variables of the production deployment for any relevant configuration settings.

Databases

Determine the connection string for any SQL database.

Connection strings are typically found in configuration files for a Spring Boot application.

database

Message brokers for JMS

  • Look for the relevant dependencies in the build manifest (typically a pom.xml or build.gradle file) to identify the broker or brokers in use.
     
  • Spring Boot applications that use commercial brokers frequently have dependencies on the brokers' JMS driver libraries.
     
  • Find the corresponding settings after identifying the broker or brokers in use. In Spring Boot applications, they are typically found in the application directory's application.properties and application.yml files.

Determine external caches

Determine whether any external caches are in use. Redis is frequently used in conjunction with Spring Data Redis. See the Spring Data Redis documentation for configuration details.

Search for the appropriate configuration to see if Spring Session is caching session data (in Java or XML).

Identity service providers

Identify any identity provider(s) that your application may use. Consult the following for information on how identity providers can be configured:

  • See the Spring Security reference for OAuth2 configuration.
     
  • See the Auth0 Spring Security documentation for configuration information.
     
  • See the Auth0 PingFederate instructions for PingFederate Spring Security configuration.
     

All other outside resources

In this guide, it is impossible to document every possible external dependency. Your team is responsible for ensuring that your application's external dependencies can be met after an App Service migration.

App Service migration

Secrets of inventory

Secure strings and passwords

On the production deployment(s), check all properties and configuration files, as well as all environment variables, for any secret strings and passwords. Such lines are most likely found in application.properties or application.yml in a Spring Boot application.

Certificates of inventory

All certificates for public SSL endpoints or communication with backend databases and other systems should be documented. Run this to view all certificates on the production server(s):

keytool -list -v -Keystore <path to keystore>

Determine whether or not the file system is being used

Using the application server's file system will necessitate reconfiguration or, in rare cases, architectural changes.

Static read-only content

If your app currently serves static content, you'll need to find a new home for it. Consider migrating static content to Azure Blob Storage and incorporating an Azure CDN for global, lightning-fast downloads. See also Static website hosting in Azure Storage and Quickstart: Azure Storage. Azure Storage for more information. Connect an Azure storage account to an Azure CDN account.

Static content that is dynamically published.

Suppose your application supports static content uploaded/produced by your application but is immutable once created. In that situation, using an Azure Function to manage uploads and CDN refresh combined with Azure Blob Storage and Azure CDN as previously mentioned will work. The sample implementation for uploading and CDN-preloading static material using Azure Functions is available for your usage.

Special Situations

Specific production scenarios may necessitate additional modifications or impose other constraints. While such systems are uncommon, ensuring that they are either inapplicable to your application or adequately resolved is critical.

Determine whether the application is dependent on scheduled jobs.

App Service does not support scheduled jobs such as Quartz Scheduler tasks or cron jobs. App Service will not prevent you from internally deploying an application with expected duties. The same job might execute many times over the scheduled period if your application is scaled out. This situation has the potential to have unintended consequences.

List any scheduled jobs, both inside and outside of the application process.

Check to see if your application contains any OS-specific code.

If your application contains code dependent on the host OS, you must refactor it to remove those dependencies. For example, in file system paths, you may need to replace any use of / or with File.Separator or Paths.get.

Identify all external processes/daemons that are running on the production server (s)

Processes outside the Application Server, such as monitoring daemons, will need to be relocated or removed.

Determine how non-HTTP requests or multiple ports are handled.

App Service only supports one HTTP endpoint on a single port. Use Azure App Service if your application listens on multiple ports or accepts requests via protocols other than HTTP.

Migration

Configure the configuration

Ascertain that all external resource coordinates (such as database connection strings) and configurable settings can be read from environment variables. All configuration settings should already be externalizable if you're migrating a Spring Boot Application. See Externalized Configuration in the Spring Boot documentation for more information.

App Service plan

Choose the service plan whose specifications match or exceed the current production hardware from the list of available programs.

​​Create and Deploy a Web Application (s)

For each executable JAR file you intend to run, you must create a Web App on your App Service Plan (using "Java SE" as the runtime stack).

Applications for Maven

If your application is built from a Maven POM file, use the Maven Webapp plugin to create the Web App and deploy it. See Quickstart: Create a Java app on Azure App Service for more information.

Maven-independent applications

If you are unable to use the Maven plugin, you must provision the Web App using another mechanism, such as:

  • Azure portal
     
  • Azure Command Line Interface
     
  • PowerShell in Azure

Post-migration

Now that your application has been migrated to Azure App Service, you should ensure that it functions as expected. After that, we have some suggestions for you to make your application more cloud-native.

Recommendations

  • If you've been using the /home directory for file storage, consider switching to Azure Storage.
     
  • Consider using Azure Key Vault and parameter injection with application settings if the configuration in the /home directory contains connection strings, SSL keys, and other sensitive information.
     
  • Consider Deployment Slots for consistent deployments with no downtime.
     
  • Create and execute a DevOps strategy. Consider automating deployments and testing with Azure Pipelines to maintain reliability while increasing development velocity. You can automate deployment to a slot followed by a slot swap when you use Deployment Slots.
     
  • Create and put into action a business continuity and disaster recovery strategy. Consider a multi-region deployment architecture for mission-critical applications.
Easy

Frequently Asked Questions

What is the purpose of Azure App Service?

Azure App Service is a one-of-a-kind cloud service that allows you to quickly and easily create enterprise-ready web and mobile apps for any platform or device and deploy them on a scalable and reliable cloud infrastructure.

What exactly is a spring boot?

Spring Boot is a Java web framework that is open source and based on microservices. The Spring Boot framework uses prebuilt code within its codebase to create an entirely configurable and production-ready environment.

Does Microsoft make use of spring boots?

Microsoft, on the other hand, is making it more straightforward. They have a Spring Boot Starter dedicated to Azure Key Vault and seamless integration with Azure Active Directory via Spring Security. I'm also excited to see managed identities in these developer SDKs. I like that Azure Active Directory B2C is supported.

What exactly is Azure batch service?

Azure Batch Service is a cloud-based job scheduling. It computes a management platform that efficiently executes large-scale parallel and high-performance computing applications in the cloud. Azure Batch Service automates job scheduling and the scaling and management of virtual machines that run those jobs.

Is Azure App Service a Software as a Service?

The Azure cloud platform provides software as a service (SaaS), platform as a service (PaaS), and infrastructure as a service (IaaS) (IaaS). These platforms offer various integrated cloud services, bundled suites, features, and various programming languages, tools, and structures to assist enterprises in their cloud journey.

Conclusion

This article has gone through Spring  Boot to Azure App Service. We discussed an open-source project allowing seamless Spring integration with Azure services. It provides a Spring-idiomatic way for developers to connect to and consume Azure services with only a few configuration lines and minimal code changes.

You can also consider our Spring Boot Course to give your career an edge over others.

Ninja, have a great time learning.

Live masterclass