When I started learning Spring, I noticed something about many of the tutorials I found.
They often showed how to use a feature, but not always why it worked or when you should choose one approach over another.
I learn best by building things and documenting what I discover, so I started a project called spring-by-example.
The idea is simple: instead of building one large application, Iβm creating a collection of small, focused examples where each example explores a specific Spring concept with clear explanations, tests, and documentation.
Iβm happy to say that Iβve now completed Module 9 β Spring Boot. π
This module focused on the foundations of Spring Boot and covered:
- SpringApplication
- Auto Configuration
- Starter Dependencies
- Configuration Properties
- Profiles
- CommandLineRunner
- Actuator
One of the things I enjoyed most about this module was seeing how much Spring Boot does behind the scenes while still allowing us to understand and control what is happening.
I started with SpringApplication, exploring how SpringApplication.run() bootstraps a Spring Boot application and creates the application context.
Then I explored Auto Configuration, which showed how Spring Boot can automatically configure application infrastructure based on the dependencies available on the classpath.
Starter Dependencies were another important piece. Instead of manually adding and managing every dependency needed for a particular feature, Spring Boot starters provide convenient dependency groupings that bring the required libraries together.
I also explored Configuration Properties, which demonstrated how application configuration can be externalized rather than hard-coded into the application.
With Profiles, I looked at how Spring applications can use different configurations depending on the active environment, such as development, testing, or production.
CommandLineRunner introduced a simple way to execute code when the application starts, which is useful for initialization tasks and understanding the application startup lifecycle.
Finally, Actuator showed how Spring Boot applications can expose operational information such as health endpoints. Seeing /actuator/health return an UP status was a nice way to finish the module.
What Iβm enjoying about Spring Boot is that it isn't just about reducing configuration.
It provides conventions and sensible defaults while still allowing developers to understand and customize the underlying Spring infrastructure.
The goal of this project isn't just to collect Spring Boot annotations and APIs. I'm trying to understand what Spring is doing underneath the surface, how its features fit together, and why these features exist, one concept at a time.
The project is open source, and Iβm continuing to build it as I learn:
π GitHub: https://gith.ub/dsAQrAU5
π GitLab: https://gitl.ab/gfDEyGH3
Thereβs still a long way to go, but completing another module feels like a good milestone. π
Next up: Spring Web (Spring MVC) β exploring DispatcherServlet, controllers, request mapping, request parameters, request bodies, views, exception handling, and request/session/application scopes.
If you've worked with Spring Boot before, what Spring Boot feature made the biggest difference in your day-to-day development?
Top comments (0)