Just started learning Spring , here's what i found !

Arkadipta KunduArkadipta Kundu
4 min read

Over the past week, I finally started exploring the Spring Framework. I've heard about Spring for a long time, and since I'm trying to improve my Java skills, it made sense to dive into it. At first, Spring seems overwhelming with its beans, containers, contexts, and more. However, after watching some helpful videos and reading parts of the official documentation, I began to connect the dots, at least at a beginner level. Here's a breakdown of what I've learned so far, written from one learner to another, in the hope that it might help you if you're just starting out like me.


📚 Resources I Used

These helped me understand things more clearly (and in plain English):

So… What is Spring?

Spring is basically a Java framework that simplifies building enterprise-grade applications. It handles a lot of boilerplate stuff so you can focus on writing clean, maintainable code.

It’s used for:

  • Dependency Injection (more on this below 👇)

  • Managing application configuration

  • Creating REST APIs

  • Connecting to databases

  • And much more…

Spring is modular, so you don’t have to learn everything at once (thank God!). You can start with Spring Core, and later move to Spring MVC, Spring Boot, Spring Security, etc.


🧠 Core Concepts I Learned

🌀 1. Inversion of Control (IoC)

This was one of the first buzzwords that popped up. At first, it sounded fancy, but it’s actually simple:

IoC = "Let Spring manage the object creation and dependency wiring for you."

Instead of creating objects manually with new, you hand over that responsibility to the Spring Container.

🧩 2. Dependency Injection (DI)

This is how IoC is achieved. If a class needs another class to work (like a Car needs an Engine), Spring can inject that dependency automatically.

There are a few ways to do this:

  • Constructor Injection

  • Setter Injection

  • (And with annotations like @Autowired — which I’ll explore more later)

🌱 3. Beans

Beans are just Java objects that Spring manages. You define them, and Spring creates and maintains their lifecycle.

You can declare a bean either via:

  • XML configuration

  • Java-based configuration (@Bean, @Component)

Spring keeps track of all these beans inside its container.

📦 4. Spring Container

This is the core of the Spring Framework. It reads your configuration (XML or Java-based), creates the objects (beans), wires dependencies, and manages their lifecycle.

Basically, it’s the smart assistant you wish you had for your code.


🧾 XML vs Java-Based Configuration (Just the Basics)

This part honestly got me a bit confused initially, but here’s the gist I figured out:

📝 XML Configuration

  • Old-school style of defining beans and wiring them via .xml files.

  • More verbose, but still used in some legacy projects.

☕ Java-based Configuration

  • Uses annotations and Java classes to configure the application.

  • Easier to read and maintain.

  • Modern Spring projects prefer this approach.

I didn’t dive deep into either — just got a basic overview of both styles. I’m planning to learn this properly in upcoming weeks.


🔮 What's Next?

I’m going to continue learning Spring and start building small modules using it. I want to get more comfortable with:

  • @Component, @Autowired, and other annotations

  • Spring’s Bean lifecycle

  • Java-based configuration in detail

  • Eventually, Spring Boot! 🚀


🔗 All My Practice Code

Check out everything I’ve written and practiced for this so far:
👉 GitHub - Spring Framework Related Codes


🥜 In a nutshell (TL;DR)

  • Spring helps manage objects and their dependencies using IoC and DI.

  • A Bean is any object managed by Spring.

  • The Spring Container handles the wiring, creation, and lifecycle of those beans.

  • You can configure Spring using XML or Java annotations (modern way).

  • I’ve only covered the basics — deeper concepts (like annotations and bean scopes) coming up next.


That’s it for now. Spring is definitely deep, but I’m glad I started slow. More updates coming soon as I learn more. Let me know if you’re learning it too — happy to geek out together. 😄

0
Subscribe to my newsletter

Read articles from Arkadipta Kundu directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Arkadipta Kundu
Arkadipta Kundu

I’m a Computer Science undergrad from India with a passion for coding and building things that make an impact. Skilled in Java, Data Structures and Algorithms (DSA), and web development, I love diving into problem-solving challenges and constantly learning. Right now, I’m focused on sharpening my DSA skills and expanding my expertise in Java development.