Spring Boot · Lesson 1 of 7

Spring Boot introduction

What Spring and Spring Boot are, creating a project and running your first app.

Spring is the most popular Java framework for backend applications. Spring Boot makes it quick to start: it auto-configures common setups, includes an embedded web server (Tomcat) and packages your app as one runnable JAR.

Create a project

  1. Go to start.spring.io (Spring Initializr).
  2. Choose Maven, Java 17 or newer, and add dependencies — start with Spring Web.
  3. Download, open in IntelliJ IDEA or VS Code, and run the main class.

The class marked @SpringBootApplication is the entry point. It turns on component scanning (finding your classes) and auto-configuration.

Settings go in src/main/resources/application.properties (or application.yml), for example server.port=8081.

Example code

Spring Boot 3 · Java 17+
// src/main/java/com/example/jobs/JobsApplication.java
package com.example.jobs;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class JobsApplication {
    public static void main(String[] args) {
        SpringApplication.run(JobsApplication.class, args);
    }
}

Output / API response

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
...
Tomcat started on port 8080 (http)
Started JobsApplication in 1.9 seconds

Generate a project at start.spring.io (Maven, Java 17+, dependencies: Spring Web, Spring Data JPA, H2, Validation), add the code, and run ./mvnw spring-boot:run. Learn the Java tutorial first if you're new to Java. Data is fictional.

Key points

  • Spring Boot = Spring with auto-configuration and an embedded server.
  • Create projects at start.spring.io.
  • @SpringBootApplication marks the main class.
  • Configure the app in application.properties or application.yml.

Quick check

What does Spring Boot's embedded server mean?

Practice task

Generate a project with Spring Web, run it, then change the port to 8081 in application.properties and run it again.

Interview corner

What is the difference between Spring and Spring Boot?

Spring is the core framework (dependency injection, MVC, data access). Spring Boot builds on it with auto-configuration, starter dependencies, an embedded server and production features, so you write far less setup code.

What does @SpringBootApplication do?

It combines @Configuration, @EnableAutoConfiguration and @ComponentScan: it marks the main configuration class, turns on auto-configuration and scans the package for components.

Further reading

Official documentation, linked for deeper study. These are outside sites; this lesson's text is our own.

Original lesson written by the InfoparkDaily team · © 2026 InfoparkDaily · Free to learn — no paid course or subscription.