Tutorials

1. Set Up Your Local Spring Boot Development Environment

Goal

Set up a complete Java development environment and create your first Spring Boot application from scratch.

What you’ll learn:

  • How to install and configure Java development tools
  • When to use Spring Initializr for project generation
  • Best practices for Spring Boot project structure

Prerequisites

Before starting, ensure you have:

  • ✓ A computer with internet access
  • ✓ Administrator/sudo privileges to install software
  • ✓ Basic familiarity with command line/terminal

Exercise Steps

Overview

  1. Install Java Development Kit (JDK)
  2. Install Apache Maven
  3. Generate Spring Boot Project
  4. Explore Project Structure
  5. Run Your First Spring Boot Application

Step 1: Install Java Development Kit (JDK)

Install the Java Development Kit to compile and run Java applications. Spring Boot 3.x requires JDK 17 or later to take advantage of modern Java features and long-term support.

»

2. Build Your First Spring Boot Web Application

Goal

Create a simple web application with a static landing page and a dynamic “Hello World” page using Spring MVC and Thymeleaf templates.

What you’ll learn:

  • How to serve static content with Spring Boot
  • When to use server-side rendering with Thymeleaf
  • Best practices for the Model-View-Controller pattern

Prerequisites

Before starting, ensure you have:

  • ✓ Completed the “Set Up Your Local Spring Boot Development Environment” tutorial
  • ✓ Spring Boot project running successfully
  • ✓ Basic understanding of HTML

Exercise Steps

Overview

  1. Create Static Landing Page
  2. Add Thymeleaf Dependency
  3. Create Hello Controller
  4. Create Hello Template
  5. Test Your Application

Step 1: Create Static Landing Page

Build a simple landing page with Bootstrap styling as the entry point to your application. Spring Boot automatically serves static content from the static directory, making it easy to add HTML, CSS, JavaScript, and images without any configuration.

»

3. Deploy Spring Boot App to Azure VM (Simple)

Deploy Spring Boot App to Azure VM (Simple)

Goal

Deploy your Spring Boot application to an Azure Virtual Machine using the simplest manual approach to understand the fundamentals of cloud deployment.

What you’ll learn:

  • How to provision an Azure Ubuntu VM
  • When to use Virtual Machines for Java applications
  • Best practices for basic cloud deployments

Prerequisites

Before starting, ensure you have:

Exercise Steps

Overview

  1. Create Azure Virtual Machine
  2. Configure VM and Install Java
  3. Build Application Locally
  4. Copy Application to VM
  5. Run Application on VM
  6. Configure Azure Firewall
  7. Test Your Deployment

Step 1: Create Azure Virtual Machine

Provision an Ubuntu Linux virtual machine in Azure to host your Spring Boot application. Virtual machines provide full control over the operating system and are a fundamental cloud computing service.

»

4. Deploy Spring Boot App to Azure VM with Systemd

Deploy Spring Boot App to Azure VM with Systemd

Goal

Deploy your Spring Boot application to Azure as a production-ready service with automatic startup using systemd process management.

What you’ll learn:

  • How to create dedicated system users for running applications
  • When to use systemd for application management
  • Best practices for production deployments on Linux
  • How to configure automatic restart and boot behavior

Prerequisites

Before starting, ensure you have:

  • ✓ Completed Tutorial 3: “Deploy to Azure VM”
  • ✓ Understanding of basic Linux commands and file permissions
  • ✓ A working Spring Boot application (SNAPSHOT version is fine)

Exercise Steps

Overview

  1. Provision New Ubuntu VM
  2. Configure VM for Production
  3. Deploy Application
  4. Create systemd Service
  5. Configure Firewall
  6. Test and Verify Production Deployment

Step 1: Provision New Ubuntu VM

Create a fresh VM for the production deployment following the same steps as the simple tutorial.

»

5. Maven Release Process and Git Workflow

Goal

Learn the proper Maven release workflow to create immutable, versioned releases suitable for production deployments. Master semantic versioning, Git tagging, and the release cycle used by professional development teams.

What you’ll learn:

  • How to create proper Maven releases (remove SNAPSHOT)
  • When and why to use semantic versioning
  • Git tagging best practices for releases
  • The standard Maven release cycle used in industry
  • How to prepare for the next development iteration

Prerequisites

Before starting, ensure you have:

»

6. Secure Your Application with Nginx Reverse Proxy

Goal

Add an Nginx reverse proxy in front of your Spring Boot application to improve security, prepare for SSL/TLS, and follow production best practices. Hide your application server behind a professional web server that handles HTTP traffic.

What you’ll learn:

  • How to configure Nginx as a reverse proxy for Java applications
  • Why reverse proxies improve security and performance
  • How to lock down network access to application ports
  • Best practices for production web application architecture
  • How to prepare infrastructure for SSL/TLS certificates

Prerequisites

Before starting, ensure you have:

»

6.1. Secure Your Application with Self-Signed SSL Certificate

Goal

Add HTTPS encryption to your Nginx reverse proxy using a self-signed SSL certificate. This tutorial builds on your existing HTTP setup to provide encrypted communication between browsers and your server.

What you’ll learn:

  • How SSL/TLS certificates provide encryption
  • The difference between encryption and trust (why browsers show warnings)
  • How to generate self-signed certificates with OpenSSL
  • How to configure Nginx for HTTPS with modern TLS settings
  • How to add security headers for defense in depth

Prerequisites

Before starting, ensure you have:

»

6.2.a. Set Up DuckDNS

Goal

Configure a free DNS subdomain using DuckDNS to enable SSL certificate issuance from Let’s Encrypt, which requires a domain name rather than an IP address.

What you’ll learn:

  • Why Let’s Encrypt requires domain names for certificates
  • How to set up a free dynamic DNS subdomain
  • How DNS A records map domains to IP addresses
  • How to verify DNS configuration with command-line tools

Prerequisites

Before starting, ensure you have:

»

6.2.b. Secure with Let's Encrypt

Goal

Obtain a trusted SSL certificate from Let’s Encrypt using DNS-01 challenge via DuckDNS, eliminating browser security warnings and enabling secure HTTPS connections to your application.

What you’ll learn:

  • How Let’s Encrypt’s DNS-01 challenge works for domain verification
  • How to install and configure Certbot with DNS plugins
  • How to configure Nginx for HTTPS with automatic certificate management
  • Best practices for certificate renewal automation

Prerequisites

Before starting, ensure you have:

»