Posts in series "Spring Boot Basics"
24 posts
[Spring Boot Basics] Java Prerequisites for Spring Boot: OOP, Generics, Streams, Records and Annotations
The Java you need before Spring Boot 4.1.1 on Java 21: interfaces and polymorphism, List/Set/Map, generics and type erasure, lambdas and Stream, Optional, records as DTOs, and the one that matters most — custom annotations read back with reflection, exactly how @Component and @GetMapping work.
[Spring Boot Basics] Spring Framework vs Spring Boot: What Auto-Configuration, Starters and the Embedded Server Actually Do
Spring Framework 7.0.9 versus Spring Boot 4.1.1 on Java 21: what a plain Spring web application made you write, what starters and the spring-boot-dependencies BOM replace it with, why Boot 4 renamed the web starter to spring-boot-starter-webmvc, how auto-configuration backs off, embedded Tomcat against a WAR, and a map of the Spring ecosystem.
[Spring Boot Basics] Setting Up Spring Boot: JDK, IDE, Spring Initializr and Your First Application
Install JDK 21 on macOS, Windows and Linux, fix a JAVA_HOME pointing at the wrong JDK, compare IntelliJ IDEA with VS Code, generate a Spring Boot 4.1.1 project from Spring Initializr or one curl command, run it with the Gradle wrapper, read the startup log line by line, write a @RestController that returns JSON, change server.port, and fix the five errors every beginner hits.
[Spring Boot Basics] Spring Boot Project Structure: Gradle vs Maven, @SpringBootApplication and the Executable JAR
Every file Spring Initializr generates on Spring Boot 4.1.1 and Java 21: the directory layout, the Gradle and Maven wrappers, build.gradle line by line against the same pom.xml, a fair Maven vs Gradle comparison, the BOM that removes version numbers, @SpringBootApplication decomposed into its three meta-annotations with the base-package 404 reproduced, and the anatomy of the executable fat JAR.
[Spring Boot Basics] IoC and Dependency Injection in Spring: Why You Stop Calling new
The idea the whole framework rests on, demonstrated on Spring Boot 4.1.1 and Java 21: a four-class object graph built with new at every level and the three failures that follow, Inversion of Control and Dependency Injection named separately, the same graph hand-wired in main with no framework at all, then wired by the Spring container with the injected instance identities printed to prove it, plus a JUnit 5 test with a hand-made stub, an implementation swapped without touching its consumer, and an honest list of what the container costs you.
[Spring Boot Basics] Spring Beans and the ApplicationContext: @Component, Stereotypes and Component Scanning
What a Spring bean actually is and which of your objects should never be one, @Component proved to be the meta-annotation behind @Service, @Repository and @Controller, what each stereotype really adds at run time, how component scanning turns class files into BeanDefinitions, the bean-naming rule including the two-capitals case, the ApplicationContext API with the real bean count of a Spring Boot 4.1.1 app, and three registration failures reproduced with their actual messages.