Skip to content

aryansohani/SpringIntroduction

Repository files navigation

🌱 Spring Framework Introduction (Hands-On Learning)

Java Spring Maven

This repository contains my hands-on practice and exploration of Spring Core concepts while learning the Spring Framework.
Each folder demonstrates a specific concept with working examples and configuration files.

The goal of this repository is to understand Dependency Injection, Bean Lifecycle, Configuration styles, and different ways of managing objects using Spring IoC Container.


📚 Topics Covered

1️⃣ Introduction To Spring

Basic understanding of:

  • What is Spring Framework
  • Why Spring is used
  • Inversion of Control (IoC)
  • Dependency Injection (DI)
  • Spring Container

Folders:

IntroductionToSpring
Springdemo
SpringApplicationContext

⚙️ Spring Bean Creation

Understanding how Spring creates and manages objects.

Concepts covered:

  • Bean definition
  • Object creation using XML
  • Bean lifecycle basics

Folders:

SpringObjectCreation
Spring1

🔗 Dependency Injection

Setter Injection

Injecting dependencies using setter methods.

Folder:

SpringSetterInjection

Constructor Injection

Injecting dependencies using constructors.

Folder:

SpringConstructorInjection

🧩 Working With Interfaces

Learning how Spring handles interfaces and implementations.

Folder:

SpringCreatingInterface

🔁 Different Ways to Get Beans

Exploring different ways to retrieve beans from the container.

Examples:

  • getBean(String name)
  • getBean(Class type)
  • getBean(String, Class)

Folder:

Spring.getBeanWays

🤖 Autowiring in Spring

Understanding automatic dependency injection.

Concepts covered:

  • autowire="byName"
  • autowire="byType"

Folder:

SpringAutowire

⭐ @Autowired Annotation

Learning annotation-based dependency injection.

Folder:

SpringAutowired

🥇 @Primary Annotation

Understanding how Spring resolves multiple bean conflicts using @Primary.

Folder:

SpringAutowirePrimaryKeyword

🔒 Inner Beans

Learning how Inner Beans restrict usage to only the outer bean.

Folder:

SpringInnerBean

⚡ Lazy Initialization

Understanding how Spring creates beans only when required.

Folder:

SpringLazy-init

🎯 Bean Scope

Understanding different scopes of Spring beans.

Examples:

  • Singleton
  • Prototype

Folder:

SpringScope

🔗 Manual Bean Reference

Understanding dependency injection using ref attribute.

Folder:

Springrefattribute

🧠 Key Concepts Learned

  • Inversion of Control (IoC)
  • Dependency Injection
  • Bean Creation
  • Bean Scope
  • Setter Injection
  • Constructor Injection
  • Autowiring
  • Inner Beans
  • Lazy Initialization
  • Bean References

🛠 Tech Stack

  • Java
  • Spring Framework (Core)
  • XML Configuration
  • Maven
  • IntelliJ IDEA / Eclipse

📌 Purpose of This Repository

This repository is part of my journey to master Java backend development and Spring Framework fundamentals.

I will continue expanding this repository with:

  • Annotation Based Configuration
  • Java Based Configuration
  • Spring Boot
  • Spring MVC
  • Spring Data JPA

👨‍💻 Author

Aryan Sohani

  • Final Year Engineering Student
  • Learning Java Backend Development
  • Exploring the Spring Ecosystem

GitHub:
https://github.com/aryansohani

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages