Skip to content
Vikyath Shirva

Spring, Spring Boot?

- Vikyath Shirva

To get a broader understanding of how any web application works, the way it works is through a collaborative effort done by each individual component that is designed for a particular purpose. A similar working — imagine the human body; the way the human body works is through all organs and muscle groups functioning together collaboratively. Now similarly, when applications run, the individual components somehow need to be created and introduced to each other so that meaningful collaboration happens elegantly.

What does it do differently?

What the Spring framework offers at its core is a container called the Application Context. What this does is manage all the application components. These components, also called beans, are wired together inside the Application Context, and all of this together makes up the whole application.

This so-called wiring between the components (or beans) inside the Application Context is done based on a pattern called Dependency Injection (DI), which I will explain in detail in another post. But for now, here's what it means:

Suppose you have an application with many components — and by many components, I mean there are many objects that you need. For example, imagine you need a user. In the scope of OOP, you create objects of a particular class. So to get a user, you create one from the User class — that makes sense. What if you need another user? You'd create another instance from the User class. Perfect.

Now imagine you need to use a service — let's call it UserService — that does some common operation for everyone. To use it, what do you do? Exactly — create an instance of this service. But hold on, let me point something out. From the example, we created objects from User and UserService. There is a difference between these two. In Java, there are data objects and service objects, loosely speaking.

We know we can create new User objects whenever we need them. But what do you do when you need an instance of a service? You typically just need one instance so that multiple users can use this common operation. This raises the question: how do you share a common service between different instances of other classes?

That, in rough terms, is what Dependency Injection does. I'll get into the details in another post, but for now, imagine that when we create numerous objects and need to share some objects between others, DI does the job for us.

Potions Class

On top of its container, Spring also provides related libraries such as a web framework, monitoring, integration with other systems, and many other features.

Historically, the way you would tell the Application Context to wire the components was through XML. Now, Java-based configuration is more common. Autowiring and Component Scanning play an important role in automatically configuring the Spring application. What Component Scanning does is automatically discover components from the application's classpath and register them as beans in the Spring Application Context.

Now with the introduction of Spring Boot, autoconfiguration has gone well beyond component scanning and autowiring. Spring Boot is an extension of the Spring framework that offers several enhancements. One of the most amazing features is autoconfiguration, where Spring Boot can make educated guesses about what components need to be configured and wired together, based on entries in the classpath, environment variables, and more.

Spring Boot enhances Spring development so much that it's hard to imagine developing a Spring application without it.

© 2026 by Vikyath Shirva. All rights reserved.